You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2020/06/26 21:09:24 UTC

[GitHub] [incubator-pinot] siddharthteotia commented on a change in pull request #5628: Fix race condition on updating existing segment

siddharthteotia commented on a change in pull request #5628:
URL: https://github.com/apache/incubator-pinot/pull/5628#discussion_r446411159



##########
File path: pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/PinotHelixResourceManager.java
##########
@@ -1796,16 +1796,16 @@ private boolean updateExistedSegment(String tableNameWithType, String segmentNam
     }
 
     // Set all partitions to online so that they load the new segment data
-    do {
-      final IdealState idealState = _helixAdmin.getResourceIdealState(_helixClusterName, tableNameWithType);
+    HelixHelper.updateIdealState(_helixZkManager, tableNameWithType, idealState -> {

Review comment:
       I thought this is always done using CAS where you try to update the version and if the version update fails, it implies someone beat you while updating the ideal state concurrently. In that case, you fetch the updated ideal state again and start. Were we not following this protocol?




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



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org