9aman commented on code in PR #16908:
URL: https://github.com/apache/pinot/pull/16908#discussion_r2390906561
##########
pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/retention/RetentionManager.java:
##########
@@ -517,4 +517,74 @@ private RetentionStrategy
createUntrackedSegmentsRetentionStrategy(
}
return new TimeRetentionStrategy(TimeUnit.DAYS,
_untrackedSegmentsRetentionTimeInDays);
}
+
+ @Override
+ public void onChange(Set<String> changedConfigs, Map<String, String>
clusterConfigs) {
+ if
(changedConfigs.contains(ControllerConf.ControllerPeriodicTasksConf.ENABLE_UNTRACKED_SEGMENT_DELETION))
{
+ updateUntrackedSegmentDeletionEnabled(
+
clusterConfigs.get(ControllerConf.ControllerPeriodicTasksConf.ENABLE_UNTRACKED_SEGMENT_DELETION));
+ }
+
+ if
(changedConfigs.contains(ControllerConf.ControllerPeriodicTasksConf.UNTRACKED_SEGMENTS_RETENTION_TIME_IN_DAYS))
{
+ updateUntrackedSegmentsRetentionTimeInDays(
+
clusterConfigs.get(ControllerConf.ControllerPeriodicTasksConf.UNTRACKED_SEGMENTS_RETENTION_TIME_IN_DAYS));
+ }
+
+ if
(changedConfigs.contains(ControllerConf.ENABLE_HYBRID_TABLE_RETENTION_STRATEGY))
{
+ updateHybridTableRetentionStrategyEnabled(
+
clusterConfigs.get(ControllerConf.ENABLE_HYBRID_TABLE_RETENTION_STRATEGY));
+ }
+ }
+
+ private void updateUntrackedSegmentDeletionEnabled(String newValue) {
+ boolean oldValue = _untrackedSegmentDeletionEnabled;
+ try {
+ boolean parsedValue = Boolean.parseBoolean(newValue);
Review Comment:
Fixed.
##########
pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/retention/RetentionManager.java:
##########
@@ -79,12 +79,12 @@ public class RetentionManager extends
ControllerPeriodicTask<Void> {
public static final long OLD_LLC_SEGMENTS_RETENTION_IN_MILLIS =
TimeUnit.DAYS.toMillis(5L);
public static final int DEFAULT_UNTRACKED_SEGMENTS_DELETION_BATCH_SIZE = 100;
private static final RetryPolicy DEFAULT_RETRY_POLICY =
RetryPolicies.randomDelayRetryPolicy(20, 100L, 200L);
- private final boolean _untrackedSegmentDeletionEnabled;
- private final int _untrackedSegmentsRetentionTimeInDays;
+ private boolean _untrackedSegmentDeletionEnabled;
Review Comment:
Fixed
--
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]