gianm opened a new pull request, #19006:
URL: https://github.com/apache/druid/pull/19006

   Previously, the ExecutorRunnable owned the processor only while running 
runProcessorNow(). This created races with cancellation. For example, if a 
processor was canceled and cleaned up while the ExecutorRunnable was calling 
"isFinished" or "readabilityFuture" on an input channel, it could lead to 
calling those operations on a closed channel.
   
   This patch fixes it by having the ExecutorRunnable own the processor a bit 
longer, to cover the time that it may need to call methods on input and output 
channels. We now also also take care to not call methods on channels in the 
debug method logProcessorStatusString.
   
   This patch also makes BlockingQueueFrameChannel more strict about closing, 
which helps ensure the above fix is working:
   
   1) Writable channel now rejects writes when closed, rather than when the 
reader has finished reading.
   
   2) Writable channel now rejects calls to all methods other than isClosed() 
when closed. Behavior changed in: writabilityFuture(), fail(), and close().
   
   3) Readable channel now rejects calls to all methods when closed. Behavior 
changed in: isFinished(), canRead(), read(), readabilityFuture(), and close().


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