Commit 673cc30
Fix race condition: set initial heartbeat in acquire_master_role
Previously, there was a window between acquiring master role and
entering with_master_setup_heartbeat where no heartbeat existed.
Other workers could see status='setup' with no heartbeat and
incorrectly attempt takeover.
Now the initial heartbeat is set immediately after acquiring master
role, closing this window.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>1 parent 087ed66 commit 673cc30
1 file changed
Lines changed: 7 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
512 | 512 | | |
513 | 513 | | |
514 | 514 | | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
515 | 521 | | |
516 | 522 | | |
517 | | - | |
| 523 | + | |
518 | 524 | | |
519 | 525 | | |
520 | 526 | | |
| |||
0 commit comments