kfaraz commented on PR #14642: URL: https://github.com/apache/druid/pull/14642#issuecomment-1647153212
Also, I was looking at the `SegmentNukeAction` and the `KillUnusedSegmentsTask` is the only place where this is used. Now the `kill` task essentially does the following: - For a given interval, mark segments as unused - Fetch all the unused segments in that interval - Delete all the fetched unused segments Since we already have the interval, I wonder if we even need to fire multiple DELETE statements and if just a single one with the right `WHERE` clause on `start`, `end`, `datasource` and `used` would suffice. There are probably some nuances here such as the `IntervalMode` used while retrieving the unused segments, etc, but nothing that cannot be wired up. Since we are trying to optimize this code path, I think we should explore that angle as well. -- 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]
