Skip to content

feat: add support for notification-based WaitForConfig #323

@meling

Description

@meling

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.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions