mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-10-29 08:20:42 +01:00
docs: Phase 20 T5 — wire ClusterReplicationMode into diagnostic surface
Add ClusterReplicationMode and EngineProjectionMode to
FailoverVolumeState so each volume in the failover diagnostic
carries its cluster/engine mode at diagnosis time.
FailoverDiagnosticSnapshot() enriches volume entries by looking up
the registry entry for each volume. This covers both the block
volume API (GET /block/volume/{name}) and the failover diagnostic
snapshot surface.
Update phase doc to reflect actual exposure paths.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
ceb68cc66b
commit
3e6155c18e
2 files changed
+21
-7
No files matched your search
@@ -40,12 +40,14 @@ type blockFailoverState struct {
|
||||
|
||||
// FailoverVolumeState is one volume's failover diagnosis entry.
|
||||
type FailoverVolumeState struct {
|
||||
VolumeName string
|
||||
CurrentPrimary string
|
||||
AffectedServer string // dead server that triggered the failover/rebuild
|
||||
DeferredPromotion bool // true if a deferred promotion timer is pending
|
||||
PendingRebuild bool // true if a rebuild is pending for this volume
|
||||
Reason string // "lease_wait", "rebuild_pending", or ""
|
||||
VolumeName string
|
||||
CurrentPrimary string
|
||||
AffectedServer string // dead server that triggered the failover/rebuild
|
||||
DeferredPromotion bool // true if a deferred promotion timer is pending
|
||||
PendingRebuild bool // true if a rebuild is pending for this volume
|
||||
Reason string // "lease_wait", "rebuild_pending", or ""
|
||||
ClusterReplicationMode string // T5: cluster-level RF2 health at diagnosis time
|
||||
EngineProjectionMode string // T1: VS-local engine projection at diagnosis time
|
||||
}
|
||||
|
||||
// FailoverDiagnostic is a bounded read-only snapshot of failover state
|
||||
@@ -106,6 +108,15 @@ func (ms *MasterServer) FailoverDiagnosticSnapshot() FailoverDiagnostic {
|
||||
default:
|
||||
diag.V2PromotionMode = "placeholder_fail_closed"
|
||||
}
|
||||
// T5: enrich each volume entry with cluster/engine mode from registry.
|
||||
if ms.blockRegistry != nil {
|
||||
for i := range diag.Volumes {
|
||||
if entry, ok := ms.blockRegistry.Lookup(diag.Volumes[i].VolumeName); ok {
|
||||
diag.Volumes[i].ClusterReplicationMode = entry.ClusterReplicationMode
|
||||
diag.Volumes[i].EngineProjectionMode = entry.EngineProjectionMode
|
||||
}
|
||||
}
|
||||
}
|
||||
return diag
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user