vvivekiyer commented on a change in pull request #8110:
URL: https://github.com/apache/pinot/pull/8110#discussion_r798238263



##########
File path: 
pinot-controller/src/main/java/org/apache/pinot/controller/api/upload/ZKOperator.java
##########
@@ -255,6 +275,21 @@ private void processNewSegment(SegmentMetadata 
segmentMetadata, URI finalSegment
       
segmentZKMetadata.setCustomMap(segmentZKMetadataCustomMapModifier.modifyMap(segmentZKMetadata.getCustomMap()));
       if (!_pinotHelixResourceManager
           .updateZkMetadata(tableNameWithType, segmentZKMetadata, 
segmentMetadataZnRecord.getVersion())) {
+        _pinotHelixResourceManager.deleteSegment(tableNameWithType, 
segmentName);
+        throw new RuntimeException(
+            "Failed to update ZK metadata for segment: " + segmentName + " of 
table: " + tableNameWithType);
+      }
+    }
+
+    if (enableParallelPushProtection) {
+      // Release lock.
+      ZNRecord segmentMetadataZnRecord =

Review comment:
       It will be the same ZnRecord because we have acquired a lock, right?
   However, I understand that we could do away with a redundant lookup for 
ZNRecord. So removed it.




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

Reply via email to