I still see there are race conditions. 1) containOne() is checked outside the 
lock 2) Same running flag is used by all 3 threads (netty thread, 
AsyncAggregateWorker and MinorFragment). Consider a case when Netty thread 
checks the `running` state and it is true and was preempted, then minor 
fragment thread came along and reset the running state and cleared up the 
queue. After this the netty thread was scheduled and it add's the 
`RumtimeFilterWritable` inside the queue. Now no-one will cleanup this newly 
added filter.

Please see the top commit in this branch: 
https://github.com/sohami/drill/commits/DRILL-6731, if you think it looks good 
to you then cherry-pick this commit in your PR and only squash your original 
commit not the cherry-picked commit.

[ Full content available at: https://github.com/apache/drill/pull/1459 ]
This message was relayed via gitbox.apache.org for [email protected]

Reply via email to