KKcorps commented on code in PR #20010:
URL: https://github.com/apache/pinot/pull/20010#discussion_r4596340437


##########
pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/retention/RetentionManager.java:
##########
@@ -123,10 +123,22 @@ protected void processTable(String tableNameWithType) {
       return;
     }
 
+    processTable(tableConfig, new TableRunContext(tableNameWithType));
+  }
+
+  /// Runs the per-table work of one run. `context` memoizes the segment ZK 
metadata list and the deep-store directory
+  /// listing used by time retention and the untracked-segment sweep. A 
subclass that adds per-table work overrides
+  /// this method and reads through the same context before calling `super`: 
it then shares the reads those steps
+  /// make, and reads on its own only where they skip one (a non-APPEND 
OFFLINE table, a table without retention,
+  /// untracked-segment deletion off). Hybrid-strategy and size-based 
retention read ZK themselves. The context is
+  /// released after time retention, which can delete segments, so a read 
after `super` sees fresh state.

Review Comment:
   Small doc thing: the read after `super` is fresh, but the deletes retention 
just issued finish async a few seconds later, so a hook that diffs ZK against 
the listing there can still flag them as missing. Maybe say "fresh, but deletes 
from this run may still be in flight" so the next hook author doesn't trust it 
as settled?



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