jiajunwang commented on a change in pull request #859: Add 'synchronized' key 
word to delete method in CustomizedStateProvider
URL: https://github.com/apache/helix/pull/859#discussion_r388464874
 
 

 ##########
 File path: 
helix-core/src/main/java/org/apache/helix/customizedstate/CustomizedStateProvider.java
 ##########
 @@ -113,7 +113,7 @@ public CustomizedState getCustomizedState(String 
customizedStateName, String res
   /**
    * Delete the customized state for a specified resource and a specified 
partition
    */
-  public void deletePerPartitionCustomizedState(String customizedStateName, 
String resourceName,
+  public synchronized void deletePerPartitionCustomizedState(String 
customizedStateName, String resourceName,
 
 Review comment:
   ZK is the source of truth. Even we control the concurrency in one single 
node, we can not prevent multiple nodes concurrent access. So leverage ZK 
capability is the right way.
   In detail, updater prevents unexpected overwrite. So I don't think the 
additional check is necessary. Unless we have a concrete counter-example.

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