mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-10-13 17:48:29 +02:00
refactor: make bounded recovery observation events replica-scoped
Carry replica-scoped addressing through bounded recovery planning and completion events so the core no longer depends on a volume-only observation seam. This preserves the current single-replica catch-up and rebuilding behavior while aligning the observation side with the replica-scoped command path. Made-with: Cursor
This commit is contained in:
1 parent
b304b8e212
commit
16ba70f856
9 files changed
+174
-40
No files matched your search
@@ -145,7 +145,7 @@ func TestPhase14_CommandSequence_CatchUpStartIsBounded(t *testing.T) {
|
||||
core.ApplyEvent(ShipperConfiguredObserved{ID: "vol-cmd-catchup"})
|
||||
core.ApplyEvent(ShipperConnectedObserved{ID: "vol-cmd-catchup"})
|
||||
|
||||
result := core.ApplyEvent(CatchUpPlanned{ID: "vol-cmd-catchup", TargetLSN: 55})
|
||||
result := core.ApplyEvent(CatchUpPlanned{ID: "vol-cmd-catchup", ReplicaID: "replica-1", TargetLSN: 55})
|
||||
assertCommandNames(t, result.Commands, []string{
|
||||
"start_catchup",
|
||||
"publish_projection",
|
||||
@@ -176,7 +176,7 @@ func TestPhase14_CommandSequence_RebuildStartIsBounded(t *testing.T) {
|
||||
})
|
||||
core.ApplyEvent(NeedsRebuildObserved{ID: "vol-cmd-rebuild", Reason: "gap_too_large"})
|
||||
|
||||
result := core.ApplyEvent(RebuildStarted{ID: "vol-cmd-rebuild", TargetLSN: 80})
|
||||
result := core.ApplyEvent(RebuildStarted{ID: "vol-cmd-rebuild", ReplicaID: "replica-1", TargetLSN: 80})
|
||||
assertCommandNames(t, result.Commands, []string{
|
||||
"start_rebuild",
|
||||
"publish_projection",
|
||||
|
||||
Reference in new issue
Block a user