narendly commented on a change in pull request #632: Asynchronously calculating 
the Baseline
URL: https://github.com/apache/helix/pull/632#discussion_r360265116
 
 

 ##########
 File path: 
helix-core/src/main/java/org/apache/helix/controller/rebalancer/waged/AssignmentMetadataStore.java
 ##########
 @@ -92,11 +92,14 @@ protected AssignmentMetadataStore(BucketDataAccessor 
bucketDataAccessor, String
     return _bestPossibleAssignment;
   }
 
-  public void persistBaseline(Map<String, ResourceAssignment> globalBaseline) {
+  /**
+   * @return true if a new baseline was persisted.
+   */
+  public boolean persistBaseline(Map<String, ResourceAssignment> 
globalBaseline) {
     // TODO: Make the write async?
     // If baseline hasn't changed, skip writing to metadata store
     if (compareAssignments(_globalBaseline, globalBaseline)) {
-      return;
+      return false;
 
 Review comment:
   This behavior might be confusing. This is not ideal... usually people would 
think if I get a false, that means that a write to metadata store failed (for 
example, ZK write failure). But here, that's not necessarily the case. In this 
case, we decide not to write it on purpose because there's no diff.
   
   How should we differentiate this behavior clearly? The fact that there's no 
diff doesn't necessarily mean a write failure happened, and we should make each 
case be expressed distinctly?

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to