swaminathanmanish commented on code in PR #15048:
URL: https://github.com/apache/pinot/pull/15048#discussion_r1954834345


##########
pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/SegmentDeletionManager.java:
##########
@@ -282,6 +284,23 @@ protected void removeSegmentFromStore(String 
tableNameWithType, String segmentId
     }
   }
 
+  /**
+   * Gets URI for segment deletion by:
+   * 1. Fetching download URL from ZK metadata if available
+   * 2. Otherwise, constructing URI from data dir, table name and segment ID
+   */
+  private URI getFileToDeleteURI(String tableNameWithType, String segmentId) {
+    String segmentDownloadUrl =
+        
Optional.ofNullable(ZKMetadataProvider.getSegmentZKMetadata(_propertyStore, 
tableNameWithType, segmentId))

Review Comment:
   We decided not to use downloadUrl but instead use known suffixes for segment 
file name stored in Deep Store. Looking up Zk metadata for download url can be 
expensive, especially when it comes to table deletion, when all segments have 
to be looked up in Zk, to get the download url. 



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

Reply via email to