danprince1 commented on a change in pull request #10877:
URL: https://github.com/apache/druid/pull/10877#discussion_r574826013
##########
File path:
server/src/main/java/org/apache/druid/server/coordinator/duty/KillUnusedSegments.java
##########
@@ -131,12 +135,35 @@ public DruidCoordinatorRuntimeParams
run(DruidCoordinatorRuntimeParams params)
Interval findIntervalForKill(String dataSource, int limit)
{
List<Interval> unusedSegmentIntervals =
- segmentsMetadataManager.getUnusedSegmentIntervals(dataSource,
DateTimes.nowUtc().minus(retainDuration), limit);
+ segmentsMetadataManager.getUnusedSegmentIntervals(dataSource,
getEndTimeUpperLimit(), limit);
if (unusedSegmentIntervals != null && unusedSegmentIntervals.size() > 0) {
return JodaUtils.umbrellaInterval(unusedSegmentIntervals);
} else {
return null;
}
}
+
+ /**
+ * Calculate the {@link DateTime} that wil form the upper bound when looking
for segments that are
+ * eligible to be killed. If ignoreDurationToRetain is true, we have no
upper bound and return a DateTime object
+ * for 9999-12-31T23:59. This static date has to be used becuse the metasore
is not comparing date objects, but rather
Review comment:
```suggestion
* for 9999-12-31T23:59. This static date has to be used because the
metastore is not comparing date objects, but rather
```
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]