capistrant commented on code in PR #20460:
URL: https://github.com/apache/druid/pull/20460#discussion_r4186305361
##########
processing/src/main/java/org/apache/druid/frame/processor/FrameProcessorExecutor.java:
##########
@@ -666,13 +703,26 @@ private void cancel(final Set<FrameProcessor<?>>
processorsToCancel)
}
}
- private <T> void registerCancelableProcessor(final FrameProcessor<T>
processor, @Nullable final String cancellationId)
+ /**
+ * Register a processor so {@link #cancel(String)} can find it.
+ *
+ * @return true if registered, or if there is no cancellationId to register
under. False if {@code cancellationId}
+ * is already canceled, in which case the caller must not run the processor
and owns cleaning it up.
+ */
+ private <T> boolean registerCancelableProcessor(
+ final FrameProcessor<T> processor,
+ @Nullable final String cancellationId
+ )
{
if (cancellationId != null) {
synchronized (lock) {
+ if (!activeCancellationIds.contains(cancellationId)) {
Review Comment:
are these cancellationIDs ever actually re-used?
--
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]