We currently have a test helper in testing_shared.go: WaitForConfigCondition(), which uses a timer-delay loop to repeatedly check whether all servers have joined the configuration. This is useful in tests to ensure that we know when we have a full configuration. But it can also be useful for users who want to wait until a full configuration is ready before accepting quorum calls.
However, since inboundManager.rebuildConfig already knows exactly when the configuration changes and holds the lock at that point. Rather than forcing callers to poll Config() in a loop, the inboundManager should broadcast each configuration change to waiting goroutines the moment it is rebuilt. This eliminates unnecessary latency and CPU overhead.
We currently have a test helper in
testing_shared.go:WaitForConfigCondition(), which uses a timer-delay loop to repeatedly check whether all servers have joined the configuration. This is useful in tests to ensure that we know when we have a full configuration. But it can also be useful for users who want to wait until a full configuration is ready before accepting quorum calls.However, since
inboundManager.rebuildConfigalready knows exactly when the configuration changes and holds the lock at that point. Rather than forcing callers to pollConfig()in a loop, the inboundManager should broadcast each configuration change to waiting goroutines the moment it is rebuilt. This eliminates unnecessary latency and CPU overhead.