uds5501 commented on code in PR #18436:
URL: https://github.com/apache/druid/pull/18436#discussion_r2303112497
##########
server/src/main/java/org/apache/druid/segment/realtime/appenderator/StreamAppenderator.java:
##########
@@ -1559,6 +1567,22 @@ public Void apply(@Nullable Object input)
);
}
+ private void unlockIntervalIfApplicable(Sink abandonedSink)
+ {
+ Interval abandonedInterval = abandonedSink.getInterval();
+ boolean isIntervalActive = sinks.entrySet().stream()
+ .anyMatch(entry -> {
+ Sink sink = entry.getValue();
+ return !Objects.equals(sink,
abandonedSink)
+ && sink.isWritable()
+ &&
sink.getInterval().overlaps(abandonedInterval);
+ });
+ if (!isIntervalActive) {
+ taskIntervalUnlocker.releaseLock(abandonedInterval);
+ }
+ log.info("implement this.");
Review Comment:
> Can you please check if throwing an exception here will cause the task
itself to fail or any other side effect?
It should not because it's being called async from`StreamAppenderatorDiver`
and the onSuccess / onFailure hooks are updating metric related records, so
safe to do so.
--
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]