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

bug: fix concurrent same-row mutations #11

Merged
merged 1 commit into from
Feb 14, 2024

Conversation

jehiah
Copy link
Member

@jehiah jehiah commented Feb 14, 2024

Because the underlying datastore rows_t is single-row per rowKey all row operations involve a datastore get() followed by update/insert; this means there is a race condition with concurrent updates where intermediate updates are lost.

This adds table level locking to serialize operations. The goal for this emulator isn't fast it's correct and persistent.

@jehiah jehiah added the bug Something isn't working label Feb 14, 2024
@jehiah jehiah self-assigned this Feb 14, 2024
@jehiah jehiah requested a review from pevans96 February 14, 2024 03:14
bttest/inmem_test.go Outdated Show resolved Hide resolved
@jehiah jehiah merged commit f5c75b0 into bitly:master Feb 14, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

Successfully merging this pull request may close these issues.

2 participants