uds5501 commented on code in PR #18436:
URL: https://github.com/apache/druid/pull/18436#discussion_r2302997377


##########
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()

Review Comment:
   These 2 conditions mean:
   - The other sink should not be the same sink we are abandoning during 
evaluation
   - The other sink should not have finished writing, if it has finished 
writing, its interval should be available to be unlocked imo.
   
   Added the same to java doc.



-- 
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]

Reply via email to