vvivekiyer commented on a change in pull request #8110:
URL: https://github.com/apache/pinot/pull/8110#discussion_r798119980
##########
File path:
pinot-controller/src/main/java/org/apache/pinot/controller/api/upload/ZKOperator.java
##########
@@ -232,15 +240,27 @@ private void processNewSegment(SegmentMetadata
segmentMetadata, URI finalSegment
.info("Moved segment {} from temp location {} to {}", segmentName,
currentSegmentLocation.getAbsolutePath(),
finalSegmentLocationURI.getPath());
} catch (Exception e) {
+ // Cleanup the Zk entry and the segment from the permanent directory
if it exists.
LOGGER
.error("Could not move segment {} from table {} to permanent
directory", segmentName, tableNameWithType, e);
+ _pinotHelixResourceManager.deleteSegment(tableNameWithType,
segmentName);
Review comment:
I have a test already added in ZkOperatorTest to ensure that the clean
up is done.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]