mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-09-24 08:54:28 +00:00
After assignment executes through V2 core, evaluateActivationGate() checks the resulting projection locally. If mode is degraded, needs_rebuild, bootstrap_pending, or allocated_only, the volume is gated from serving. Gate is enforced immediately after assignment, before the next heartbeat round-trip. Gate cleared only when projection reaches publish_healthy or replica_ready. IsActivationGated() provides the query surface for iSCSI/NVMe adapter enforcement. Heartbeat carries ActivationGated and ActivationGateReason fields so master can observe the gated state (report path, not enforcement path). activationGated map on BlockService tracks per-volume gate state. Initialized in constructor. Test helper updated to include it. 6 tests: degraded gates, needs_rebuild gates, healthy clears gate, gate enforced before heartbeat, recovery re-enables, assignment with degraded projection triggers gate. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>