Repository navigation
Commit bbc292a
authored
fix(durable): keep await deadlines independent of status polls (#4508)
## AgentScope-Java Version
2.1.0-SNAPSHOT
## Description
Fixes #4507. A blocked status read can occupy the observer pool and
prevent DurableTurn.await(timeout) from settling. An inline timeout
callback can also stall subsequent waits if it runs on the deadline
scheduler.
Use a Runtime-owned deadline scheduler to dispatch timeout completions
to a separate elastic executor. The elapsed wait completes exceptionally
with a TimeoutException containing its Thread/Turn identity. Status
polling stays on the observer pool. Runtime close shuts both new
executors down. An admitted Turn can still be queried after the wait
ends.
The two regressions cover a blocked backend poll and an earlier
non-async completion callback held on a latch. In both scenarios the
wait times out while the blockage is held.
## Verification
- The blocked-read and blocked-callback regressions fail on main at
9cfeaad. The blocked-callback case also fails on the previous PR head
d5fccbe, which completed directly on its deadline thread.
- Ran `mvn -B -T1C -pl agentscope-durable/durable-runtime -am clean
verify` on the updated branch. All 50 tests passed without skips on
Windows/Java 17.
- The targeted Harness test that previously timed out in Windows CI
passed all ten parameter sets on this head. Full repository checks are
running again in CI.
- Spotless, git diff checks, all 20 documentation tests, and Mintlify
validation passed. The link checker reported the same 2,754
source/target entries on main and this branch.
AI assistance was used for investigation, implementation, and
verification.
## Checklist
- [x] Code has been formatted with `mvn spotless:apply`
- [ ] All tests are passing (`mvn test`)
- [x] Javadoc comments follow project conventions
- [x] Related documentation has been updated
- [x] Code is ready for review1 parent 1cf8060 commit bbc292a
4 files changed
Lines changed: 115 additions & 12 deletions
File tree
- agentscope-durable/durable-runtime/src
- main/java/io/agentscope/durable
- test/java/io/agentscope/durable
- docs/dev
- en/docs/harness
- zh/docs/harness
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
| 132 | + | |
| 133 | + | |
132 | 134 | | |
133 | 135 | | |
134 | 136 | | |
| |||
318 | 320 | | |
319 | 321 | | |
320 | 322 | | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
321 | 328 | | |
322 | 329 | | |
323 | 330 | | |
| |||
497 | 504 | | |
498 | 505 | | |
499 | 506 | | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
500 | 515 | | |
501 | 516 | | |
502 | 517 | | |
| |||
515 | 530 | | |
516 | 531 | | |
517 | 532 | | |
518 | | - | |
519 | | - | |
520 | | - | |
521 | | - | |
522 | | - | |
523 | | - | |
524 | | - | |
525 | 533 | | |
526 | 534 | | |
527 | 535 | | |
| |||
538 | 546 | | |
539 | 547 | | |
540 | 548 | | |
| 549 | + | |
541 | 550 | | |
542 | | - | |
543 | | - | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
544 | 555 | | |
545 | 556 | | |
546 | 557 | | |
| |||
1262 | 1273 | | |
1263 | 1274 | | |
1264 | 1275 | | |
| 1276 | + | |
| 1277 | + | |
1265 | 1278 | | |
1266 | 1279 | | |
1267 | 1280 | | |
| |||
1283 | 1296 | | |
1284 | 1297 | | |
1285 | 1298 | | |
1286 | | - | |
| 1299 | + | |
| 1300 | + | |
| 1301 | + | |
| 1302 | + | |
| 1303 | + | |
| 1304 | + | |
| 1305 | + | |
| 1306 | + | |
1287 | 1307 | | |
1288 | 1308 | | |
1289 | 1309 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| |||
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
| 39 | + | |
38 | 40 | | |
39 | 41 | | |
40 | 42 | | |
| |||
87 | 89 | | |
88 | 90 | | |
89 | 91 | | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
90 | 171 | | |
91 | 172 | | |
92 | 173 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
376 | 376 | | |
377 | 377 | | |
378 | 378 | | |
379 | | - | |
380 | | - | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
381 | 382 | | |
382 | 383 | | |
383 | 384 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
323 | 323 | | |
324 | 324 | | |
325 | 325 | | |
| 326 | + | |
326 | 327 | | |
327 | 328 | | |
328 | 329 | | |
| |||
0 commit comments