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

 ##########
 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:
   @jiajunwang That's the behavior we have right now. But I am okay with 
leaving it as is, but we should really make this explicit in our JavaDoc at 
least...
   
   Could we also create a TODO here? We could think about multiple different 
approaches. Perhaps moving the check outside the metadata store might be 
better, but that should be in a separate PR.

----------------------------------------------------------------
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