Commit 440f289
Fix stale worker after refork: remove phase bump from mold_and_refork!
The phase bump on the mold candidate in mold_and_refork! had two
compounding bugs:
1. promote_mold filters by `w.phase == @phase`, so the bumped worker
was excluded from selection — a different worker got promoted instead
2. After start_phased_restart increments @phase, the bumped worker's
phase matched the new @phase, so check_workers skipped it — leaving
one worker un-restarted with stale process state
Without the phase bump, promote_mold naturally selects the most
experienced worker (same one mold_and_refork! would have chosen), and
all workers are properly restarted during the phased refork.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 7b0c721 commit 440f289
1 file changed
Lines changed: 2 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
322 | 322 | | |
323 | 323 | | |
324 | 324 | | |
325 | | - | |
| 325 | + | |
326 | 326 | | |
327 | | - | |
328 | 327 | | |
329 | 328 | | |
330 | 329 | | |
| |||
370 | 369 | | |
371 | 370 | | |
372 | 371 | | |
373 | | - | |
| 372 | + | |
374 | 373 | | |
375 | 374 | | |
376 | 375 | | |
| |||
0 commit comments