tzphh commented on PR #10756:
URL: https://github.com/apache/paimon/pull/10756#issuecomment-6436419154

   > [P2] Synchronize task startup before asserting build execution
   > 
   > Location: 
[BucketedPrimaryKeyIndexMaintainerTest.java:538](https://github.com/apache/paimon/blob/e9c10788211070749fc2998b983461119d251d1e/paimon-core/src/test/java/org/apache/paimon/index/pk/BucketedPrimaryKeyIndexMaintainerTest.java#L538)
   > 
   > Submitting both builds does not guarantee that both have started. If the 
second worker is delayed, BTree can exhaust its three attempts and fail before 
the bitmap task begins. Rollback then correctly cancels that task before 
execution, leaving `buildOrder` as `["btree", "btree", "btree"]`, so this new 
assertion fails even though cancellation works correctly. I reproduced this 
deterministically with the same two-thread executor by delaying only the second 
worker's startup.
   > 
   > Please either add a `bitmapStarted` latch and make the failing BTree build 
wait for it, or allow the assertion to account for cancellation before 
execution. The interruption test has the same scheduling assumption: waiting 
only for `secondStarted` does not establish that the first build has started, 
so its later `firstBuilds == 2` assertion can also fail; delaying the first 
worker reproduces `firstBuilds == 1` after retry.
   > 
   > The 76 focused Core tests passed under normal scheduling; both failures 
above were reproduced with controlled worker scheduling.
   
   Both scheduling assumptions are fixed in e787eb7f96. The BTree builder waits 
for `bitmapStarted` before failing, and the interruption test waits for both 
builders to start. The existing execution-count, rollback-state, and 
output-file assertions are preserved. Both failures were reproduced with 
delayed worker startup and passed with the same delays after the fix.
   
   After removing the temporary harness, all 139 focused Core tests passed 
locally on this head on JDK 8 (1.8.0_512), JDK 11 (11.0.27), and JDK 17, 
including both rollback/retry tests.


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