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

Rewind cursor a bit before reconnection for some relay hosts to smooth over reconnection #825

Merged
merged 1 commit into from
Nov 19, 2024

Conversation

ericvolp12
Copy link
Collaborator

We see some jerk when the Relay restarts caused by high concurrency of event processing for some high traffic hosts, where some in-progress event handlers die while the cursor is advanced ahead of them and the next event for that repo triggers a catch-up/resync of the repo. This change rewinds the cursor a bit on reconnect to smooth out that process.

Copy link
Collaborator

@whyrusleeping whyrusleeping left a comment

Choose a reason for hiding this comment

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

For the record, i think theres an edge case where if the relay restarts too fast, we might end up ratcheting the cursor back multiple times and persisting it

@whyrusleeping whyrusleeping merged commit 966c093 into main Nov 19, 2024
7 checks passed
@ericvolp12 ericvolp12 deleted the bsky_net_rewind_cursor branch November 19, 2024 18:18
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