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 2020/03/05 17:51:34 UTC

[GitHub] [helix] zhangmeng916 commented on a change in pull request #859: Add 'synchronized' key word to delete method in CustomizedStateProvider

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

 ##########
 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:
   There can be multiple threads that try to delete partitions in a same resource. Do we want to leave the currency to the Zookeeper or maybe we can prevent it from the beginning. There are some similar pattern in the code base. We can discuss to decide whether we want to follow.

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