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

Skip duplicate message processing #1022

Merged
merged 1 commit into from
Aug 30, 2024

Conversation

neekolas
Copy link
Contributor

@neekolas neekolas commented Aug 30, 2024

Summary

Often messages are received on a stream after they have already been synced. This can happen when you have multiple streams open, or when you are processing your own messages.

Processing messages is expensive and requires locking the database for a transaction. We're better off skipping these duplicates if we can. This does that by checking if the last synced ID is > the ID of the message.

Copy link
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @neekolas and the rest of your teammates on Graphite Graphite

@neekolas neekolas force-pushed the 08-29-skip_duplicate_message_processing branch from 5a82b80 to 12293f1 Compare August 30, 2024 01:02
@neekolas neekolas marked this pull request as ready for review August 30, 2024 01:26
@neekolas neekolas requested a review from a team as a code owner August 30, 2024 01: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