mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-07-30 12:03:21 +00:00
Fix three tester findings on T4 activation gate: 1. Real serving enforcement: evaluateActivationGate now calls gateServing() → DisconnectVolume(iqn) on gate (terminates active iSCSI sessions, removes volume from target). ungateServing() → AddVolume(iqn, adapter) on clear (re-registers volume). This is actual serving enforcement, not just bookkeeping. 2. Wire propagation: add activation_gated (field 25) and activation_gate_reason (field 26) to proto BlockVolumeInfoMessage. Add generated Go fields + getters. Add proto conversion in InfoMessageToProto/InfoMessageFromProto. Gate state now rides the real VS→master heartbeat wire. 3. Runtime ungate: evaluateActivationGate() now also runs in applyCoreEvent() (the observation-driven path), not just applyCoreAssignmentEvent(). Recovery/catch-up completion that transitions the projection to publish_healthy/replica_ready now clears the gate and re-registers the volume automatically. ClearActivationGate() remains as an explicit override for edge cases but is no longer the primary ungate path. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>