mirror of
https://github.com/hanzoai/s3.git
synced 2026-10-30 14:59:09 +00:00
Every ZAP-native service binds THREE ports — http P, grpc P+10000, and its
native ZAP transport pb.ZapPort(grpc)=P+20000 — but AllocateMiniPorts only
reserved/verified P and P+10000. Two masters in one cluster could therefore be
handed colliding ZAP ports; the loser Fatalf's on its ZAP listener at startup
and is later unreachable ("connection refused"). Probabilistic, so it only
surfaced running the multi_master suite in sequence (TestSurvivorKeepsWriting /
TestWriterConsistency failed in the full run though each passed alone).
Reserve and net.Listen-verify the ZAP port too, and require it in-range so the
reserved port equals the master's actual (un-rotated) ZAP port. Benefits every
ZAP-based mini test.
Co-authored-by: Hanzo Dev <[email protected]>