lancelly opened a new pull request, #9690:
URL: https://github.com/apache/iotdb/pull/9690

   cherry-picked from 6a8d009
   
   At first, we add synchronized on decrementGet method to avoid concurrent 
modification on cnt or we may close the shuffleSinkHandle wrongly. However, 
using AtomicBoolean is enough to ensure that one channel only decrement the cnt 
once.
   Moreover, adding synchronized on decrementGet method could lead to dead 
lock. Thread A invokes onFinsh of ISinkLitsener and holds the lock of it. Then 
A tries to lock the corresponding SinkChannel while Thread B invokes close of 
SinkChannel first and holds the lock of SinkChannel and then try to lock 
ISinkListener.
   So we need to remove the synchonized keyword on decrementGet method.


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

Reply via email to