kfaraz commented on code in PR #17545:
URL: https://github.com/apache/druid/pull/17545#discussion_r1889565394
##########
server/src/main/java/org/apache/druid/server/coordinator/DruidCoordinator.java:
##########
@@ -628,6 +628,30 @@ private List<CompactSegments>
getCompactSegmentsDutyFromCustomGroups()
.collect(Collectors.toList());
}
+ /**
+ * Makes an API call to Overlord to mark segments of a datasource as unused.
+ *
+ * @return Number of segments updated.
+ */
+ private int markSegmentsAsUnused(String datasource, Set<SegmentId>
segmentIds)
+ {
+ try {
+ final Set<String> segmentIdsToUpdate
+ =
segmentIds.stream().map(SegmentId::toString).collect(Collectors.toSet());
+ final SegmentsToUpdateFilter filter
+ = new SegmentsToUpdateFilter(null, segmentIdsToUpdate, null);
+ SegmentUpdateResponse response = FutureUtils.getUnchecked(
+ overlordClient.markSegmentsAsUnused(datasource, filter),
Review Comment:
Ah, thanks for catching this!!
I updated the `OverlordDataSourcesResource` to fallback to updating the
metadata store directly but missed updating it here. Will handle this case too.
--
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]