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

OplogToRedis: Read Parallelism #72

Merged
merged 9 commits into from
May 2, 2024
Merged

Conversation

alex-goodisman
Copy link
Contributor

@alex-goodisman alex-goodisman commented Apr 25, 2024

This is a follow-on to #70.

This adds read parallelism in addition to the write-parallelism. Every read routine has its own Mongo session, and will consume the entire oplog. When processing a message, the same hash that is used to route the message to the appropriate write routine will be first compared to the ordinal of the read routine. If it doesn't match, it will simply be discarded. The result of this is that every message will be processed by exactly one read routine.

The read routines need not correspond one-to-one with the write routines.

@alex-goodisman alex-goodisman force-pushed the alex.read-parallelism branch from a68b0e7 to 163729f Compare April 29, 2024 16:26
@alex-goodisman alex-goodisman marked this pull request as ready for review April 29, 2024 16:48
lib/oplog/tail.go Outdated Show resolved Hide resolved
main.go Show resolved Hide resolved
main.go Outdated Show resolved Hide resolved
@alex-goodisman alex-goodisman merged commit 9bff003 into master May 2, 2024
11 checks passed
@delete-merged-branch delete-merged-branch bot deleted the alex.read-parallelism branch May 2, 2024 19:11
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