Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIXED] Peer removal race #6316

Merged
merged 1 commit into from
Jan 2, 2025
Merged

[FIXED] Peer removal race #6316

merged 1 commit into from
Jan 2, 2025

Conversation

MauriceVanVeen
Copy link
Member

There was a race with keeping peers up-to-date. When updating replicas of a stream up and down rapidly enough the peer state could desync since the update is handled by the meta layer, but the peer removal is handled by the stream. If the meta layer agreed on scaling the stream up to 5 replicas, but a peer removal came in after from an earlier downscale, then a server would end up with an incomplete peer list.

Since peer changes are done by the meta layer we can/should trust that does the right thing, and we don't need to fiddle by proposing peer removals ourselves.

Also, since the meta layer handles stream creates/updates and calls into UpdateKnownPeers already, we shouldn't then propose the peers (again) through the stream layer.

Signed-off-by: Maurice van Veen github@mauricevanveen.com

Signed-off-by: Maurice van Veen <github@mauricevanveen.com>
@MauriceVanVeen MauriceVanVeen requested a review from a team as a code owner January 2, 2025 14:28
Copy link
Member

@derekcollison derekcollison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@derekcollison derekcollison merged commit 2dc32c1 into main Jan 2, 2025
5 checks passed
@derekcollison derekcollison deleted the maurice/peers-race branch January 2, 2025 23:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants