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 2022/01/27 18:52:06 UTC

[GitHub] [pinot] Jackie-Jiang commented on a change in pull request #8077: add logic to instant delete segment

Jackie-Jiang commented on a change in pull request #8077:
URL: https://github.com/apache/pinot/pull/8077#discussion_r793905818



##########
File path: pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/SegmentDeletionManager.java
##########
@@ -60,13 +60,15 @@
   private final String _helixClusterName;
   private final HelixAdmin _helixAdmin;
   private final ZkHelixPropertyStore<ZNRecord> _propertyStore;
+  private final int _controllerDefaultDeletedSegmentsRetentionInDays;

Review comment:
       (minor) 
   ```suggestion
     private final int _defaultDeletedSegmentsRetentionInDays;
   ```

##########
File path: pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/SegmentDeletionManager.java
##########
@@ -165,40 +167,55 @@ protected synchronized void deleteSegmentFromPropertyStoreAndLocal(String tableN
 
   public void removeSegmentsFromStore(String tableNameWithType, List<String> segments) {
     for (String segment : segments) {
-      removeSegmentFromStore(tableNameWithType, segment);
+      removeSegmentFromStore(tableNameWithType, segment, _controllerDefaultDeletedSegmentsRetentionInDays);
     }
   }
 
-  protected void removeSegmentFromStore(String tableNameWithType, String segmentId) {
+  protected void removeSegmentFromStore(String tableNameWithType, String segmentId,
+      int deletedSegmentsRetentionInDays) {

Review comment:
       Remove this new argument, and use `_controllerDefaultDeletedSegmentsRetentionInDays` instead




-- 
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-unsubscribe@pinot.apache.org

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