TSFenwick commented on code in PR #14131:
URL: https://github.com/apache/druid/pull/14131#discussion_r1272636829
##########
processing/src/main/java/org/apache/druid/segment/loading/DataSegmentKiller.java:
##########
@@ -54,6 +55,29 @@ static String descriptorPath(String path)
*/
void kill(DataSegment segment) throws SegmentLoadingException;
+ /**
+ * Kills a list of segments from deep storage. The default implementation
calls kill on the segments in a loop.
+ * Implementers of this interface can leverage batch / bulk deletes to be
more efficient. It is preferable to attempt
+ * to delete all segments even if there is an issue with deleting a single
one. This is up to implementers to
+ * implement as putting a try catch around the default kill via iteration
can be problematic if the client of the deep
+ * storage is unable to authenticate itself and segment loading exception
doesn't encode enough information in it to \
+ * understand why it failed.
+ * <p>
+ * If a segment or segments does not exist in deep storage, the method
should not throw an exception.
+ * <p>
+ * This version of kill must **NOT** require additional permissions on the
deep storage beyond what
+ * {@link #kill(DataSegment)} requires.
+ * @param segments The list of segments to kill.
+ * @throws SegmentLoadingException If there is an exception during deletion
such as a segment in the list could not be
+ * completely removed.
+ */
+ default void kill(List<DataSegment> segments) throws SegmentLoadingException
Review Comment:
I agree. This was chosen not to be done in this PR as it would require more
testing
--
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]