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

 ##########
 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)) {
 
 Review comment:
   Can we move this check outside of this method? My 2 cents, this persisting 
method only does persisting. True if successful, false if fails. If baseline is 
not changed, it should be decided outside of this method. If you call this 
method to persist, I will Do my job to persist it no matter it is not changed 
or not.  

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