Core: Skip testAddManyFilesWithConsistentOrdering if WORKER_THREAD_POOL_SIZE < 3#16506
Conversation
0be6550 to
9201f40
Compare
|
I also ran into the same problem. We should probably fix this problem as part of this PR, which can explicitly control the writer thread pool and parallelism cc @dramaticlly |
| public void testAddManyFilesWithConsistentOrdering() { | ||
| assertThat(listManifestFiles()).as("Table should start empty").isEmpty(); | ||
|
|
||
| int multiplier = 3; |
There was a problem hiding this comment.
let's just change the assumeThat check to 3 and leave other code unchanged. We can merge this small change quickly to fix the flakiness.
I mentioned the proper long term fix in another comment.
There was a problem hiding this comment.
Do we only run into this if the build only have 2 cores available?
If so we can update as Steven suggested as
int multiplier = 3;
assumeThat(ThreadPools.WORKER_THREAD_POOL_SIZE).isGreaterThanOrEqualTo(multiplier);verified with ICEBERG_WORKER_NUM_THREADS=2 ./gradlew :iceberg-core:test --tests "org.apache.iceberg.TestMergeAppend" locally
Also plan to update this test with provided writeManifestWith pool so that we can have deterministic behavior regardless of core available in the build instance
There was a problem hiding this comment.
Reverted the multiplier change, and just added assumeThat.
9201f40 to
faed6bf
Compare
faed6bf to
08c98f5
Compare
08c98f5 to
6813041
Compare
|
merged this. thanks @ebyhr for identifying and fixing the problem, and others for the review. @dramaticlly we should include the proper fix for this test in the write thread pool PR. |
The test fails if
WORKER_THREAD_POOL_SIZE< 3.