Commit 807535d
[bugfix] Fix cancellation test: GC-free query and wider CI timeout
The previous query (for $i in 1 to 999999999 return string($i)) allocated
999999999 String objects, triggering stop-the-world GC pauses several
seconds long on CI. During a GC pause the query thread cannot call
proceed(), so the volatile terminate flag goes unobserved for the duration
of the pause — causing the 5s cancel window to expire before the flag is
seen, even though the volatile fix itself is correct.
Two fixes:
1. Change query to 'for $i in 1 to 999999999 return ()': no per-iteration
allocation, no GC pressure. The query thread stays schedulable and calls
proceed() millions of times per second, so the volatile flag is observed
within microseconds of kill().
2. Widen cancelledLatch timeout from 5s to 10s and raise max-execution-time
to 30s (genuine fallback only). The max-execution-time was previously set
to 5000ms — equal to our latch timeout — so its error message was racing
the latch expiry and arriving after the test had already given up.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 4f859bd commit 807535d
1 file changed
Lines changed: 13 additions & 7 deletions
Lines changed: 13 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
475 | 475 | | |
476 | 476 | | |
477 | 477 | | |
478 | | - | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
479 | 484 | | |
480 | 485 | | |
481 | | - | |
482 | | - | |
| 486 | + | |
| 487 | + | |
483 | 488 | | |
484 | 489 | | |
485 | 490 | | |
| |||
490 | 495 | | |
491 | 496 | | |
492 | 497 | | |
493 | | - | |
494 | | - | |
495 | | - | |
496 | | - | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
497 | 503 | | |
498 | 504 | | |
499 | 505 | | |
| |||
0 commit comments