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

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


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