abhishekrb19 commented on code in PR #16247:
URL: https://github.com/apache/druid/pull/16247#discussion_r1558777865


##########
server/src/main/java/org/apache/druid/server/coordinator/DruidCoordinatorConfig.java:
##########
@@ -47,9 +45,15 @@ public abstract class DruidCoordinatorConfig
   @Default("false")
   public abstract boolean isKillUnusedSegmentsEnabled();
 
+  /**
+   * @return The period at which the coordinator cleans up unused segments. If 
the config isn't explicitly set,
+   * it defaults to the coordinator's indexing period.
+   */
   @Config("druid.coordinator.kill.period")
-  @Default("P1D")
-  public abstract Duration getCoordinatorKillPeriod();
+  public Duration getCoordinatorKillPeriod()
+  {
+    return getCoordinatorIndexingPeriod();

Review Comment:
   The `durationToRetain`/`ignoreDurationToRetain` property protects segments 
whose end date is after the specified date (`P1D`/`false` by default). So tying 
that to the cadence of the auto kill duty will be unnecessary as the duty will 
still honor this period implicitly regardless and not prematurely kill 
segments. Essentially a no-op if there are no other unused segments older than 
`durationToRetain`. There are some tests here that cover similar 
[scenarios](https://github.com/apache/druid/blob/master/server/src/test/java/org/apache/druid/server/coordinator/duty/KillUnusedSegmentsTest.java#L369).



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