[common] Ensure ParallelExecution waits for reader cleanup - #8855
[common] Ensure ParallelExecution waits for reader cleanup#8855QuakeWang wants to merge 1 commit into
Conversation
ParallelExecution marks tasks complete before reader cleanup, while close only interrupts the executor. It can therefore return before input streams are released. Wait for executor termination in close and cover the race with a controlled concurrency test. Signed-off-by: QuakeWang <[email protected]>
|
Could we avoid interrupting workers that have already finished reading and are only closing their readers?
I reproduced this with a reader whose For the normal completed-read path, could we use |
Purpose
ParallelExecutionmarks tasks complete before closing the underlying readers, whileclose()previously only interrupted the executor. As a result,close()could return while reader cleanup was still running, leaving input streams temporarilyopen.
Wait for executor termination in
close()so reader resources are released before it returns. Add deterministic coverage for the race and remove the sleep workaround fromIndexBootstrapTest.Tests
mvn -pl paimon-core -am -DfailIfNoTests=false -DwildcardSuites=none -Dtest=ParallelExecutionTest,IndexBootstrapTest testtestBootstrapIgnoresQueryAuth1,000 times concurrently on JDK 11