You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@helix.apache.org by GitBox <gi...@apache.org> on 2019/09/06 20:36:54 UTC

[GitHub] [helix] jiajunwang commented on issue #450: Implement one of the soft constraints

jiajunwang commented on issue #450: Implement one of the soft constraints
URL: https://github.com/apache/helix/pull/450#issuecomment-529005521
 
 
   > > Another question, by looking at this soft constraint impl, I am wondering if we just enforce all the soft constraint implementation to return an evaluation between (0.0 - 1.0), will that be easier? At least we don't need "getScalerFunction", right?
   > 
   > How do you want to enforce the constraint in code? Using comment? Comments will not always guarantee the correct behavior, only self explainable code does. I think scaler function is necessary and a reminder to have developers aware of the range without looking into comments
   
   For now, if I am the developer, and I return a value out of the scope of (minScore, maxScore), what will happen?
   I think the max and min thresholds are also kind of comments, right?
   
   I guess we will need to add a check to validate. However, in that case, we can just enforce the minScore = 0.0, maxScore = 1.0. And my proposal will be equal to this solution, right?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org
For additional commands, e-mail: reviews-help@helix.apache.org