Files
seaweedfs/weed
Chris LuandClaude Opus 5.5 e4321a3e89 master: write a recovered TopologyId into the hashicorp raft log on leadership (#13467)
* master: write a recovered TopologyId into the hashicorp raft log on leadership

A hashicorp raft leader whose TopologyId came from the max_volume_id mirror
never wrote it to the raft log, so followers kept an empty id. The next leader
then minted a new one, and the first master crashed with split-brain on its
next restart when it read the old id back from its mirror. Sync the id after
the barrier, as the goraft path already does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* master: test that followers learn a leader's mirrored TopologyId

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* master: call the TopologyId sync directly in its test

The leader loop never returns, so running it leaked a goroutine per test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* master: retry the barrier before syncing the TopologyId

A failed barrier skipped the sync for the whole leader term, leaving
followers without the id the next leader needs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* master: test that the next leader keeps a mirrored TopologyId

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-05 11:22:02 -08:00
..
2026-04-23 10:05:51 -07:00