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

fix(db): Execute dirty reads on the primary node #42933

Merged
merged 1 commit into from
Jan 31, 2024

Conversation

ChristophWurst
Copy link
Member

Summary

By introducing read replicas in 29+ we open the door for new read after write problems. That is, when we write on the primary and read on the replica and the replica hasn't received the data yet. This condition is logged for developer awareness. Until the dirty read is fixed by the developer, we should force the dirty read to happen on the primary. This guarantees consistency, while hurting performance due to more load on the primary.

Checklist

@ChristophWurst
Copy link
Member Author

If a change is not clear for testers/reviewers I'm happy to clarify :)

Copy link
Member

@juliushaertl juliushaertl left a comment

Choose a reason for hiding this comment

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

Makes sense as discussed

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
@ChristophWurst ChristophWurst requested a review from a team January 30, 2024 11:18
@ChristophWurst ChristophWurst merged commit 6594360 into master Jan 31, 2024
125 of 134 checks passed
@ChristophWurst ChristophWurst deleted the fix/db/dirty-read-on-primary branch January 31, 2024 09:55
@blizzz blizzz mentioned this pull request Mar 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews bug
Projects
Development

Successfully merging this pull request may close these issues.

3 participants