snazy opened a new pull request, #4443:
URL: https://github.com/apache/polaris/pull/4443

   Some test runs of `TestJavaPoolAsyncExec` failed in the 
`periodic()`/immediate test case.
   
   The issue was this race condition:
   1. delayed() schedules timer A.
   2. Timer A fires before delayed() records A in 
CancelableFuture.scheduledFuture.
   3. Timer A runs the periodic task.
   4. The periodic task schedules timer B for the next run.
   5. Timer B is recorded in CancelableFuture.scheduledFuture.
   6. The original delayed() call resumes and records stale timer A.
   7. Recording stale timer A replaces timer B and cancels timer B.
   8. The next periodic run is lost, so the test waits until timeout (5 
minutes).
   
   The fix in this change is to introduce a `scheduledGeneration` that handles 
this race condition accordingly.
   
   Polaris production deployments are not affected, because those use the 
Vert.X based implementation, which does not have this problem.


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