jtao15 commented on a change in pull request #7427: URL: https://github.com/apache/pinot/pull/7427#discussion_r714412303
########## File path: pinot-controller/src/main/java/org/apache/pinot/controller/api/upload/ZKOperator.java ########## @@ -118,10 +127,12 @@ private void processExistingSegment(SegmentMetadata segmentMetadata, URI finalSe // Lock the segment by setting the upload start time in ZK existingSegmentZKMetadata.setSegmentUploadStartTime(System.currentTimeMillis()); if (!_pinotHelixResourceManager - .updateZkMetadata(tableNameWithType, existingSegmentZKMetadata, znRecord.getVersion())) { + .updateZkMetadata(tableNameWithType, existingSegmentZKMetadata, expectedVersion)) { throw new ControllerApplicationException(LOGGER, "Failed to lock the segment: " + segmentName + " of table: " + tableNameWithType + ", retry later", Response.Status.CONFLICT); + } else { + expectedVersion++; Review comment: Added a comment for this line. -- 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. To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org