kfaraz commented on code in PR #15480:
URL: https://github.com/apache/druid/pull/15480#discussion_r1415637236
##########
server/src/main/java/org/apache/druid/server/http/DataSourcesResource.java:
##########
@@ -236,12 +250,24 @@ public Response markSegmentsAsUnused(
.collect(Collectors.toSet());
// Note: segments for the "wrong" datasource are ignored.
- return segmentsMetadataManager.markSegmentsAsUnused(
+ numUpdatedSegments = segmentsMetadataManager.markSegmentsAsUnused(
segmentIds.stream()
.filter(segmentId ->
segmentId.getDataSource().equals(dataSourceName))
.collect(Collectors.toSet())
);
+ auditPayload = Collections.singletonMap("segmentIds", segmentIds);
+ }
+ if (auditManager != null && author != null && !author.isEmpty()) {
+ auditManager.doAudit(
+ AuditEvent.builder()
+ .key(dataSourceName)
+ .type("segments.markUnused")
Review Comment:
Yeah, that makes sense to me.
So would something like the following work?
- `coordinator.markSegmentsUnused`
- `coordinator.basicAuth.createUser`
- `overlord.postTask`
- `overlord.killSegments`
--
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]