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(txn): Fix data races in transaction code #8060

Merged
merged 1 commit into from
Sep 30, 2021
Merged

Conversation

ahsanbarkati
Copy link
Contributor

@ahsanbarkati ahsanbarkati commented Sep 30, 2021

There was a data race in the transaction code. The ReadKey() function used to take lock and return a map, now the map is unprotected and any other write on it will cause data race. Same is the case with the txn.cache.deltas. This PR makes sure that the locks are properly acquired on them.


This change is Reviewable

Copy link
Contributor

@manishrjain manishrjain left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 4 of 4 files at r1, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @ahsanbarkati)

@ahsanbarkati ahsanbarkati merged commit cf22bf7 into master Sep 30, 2021
@ahsanbarkati ahsanbarkati deleted the ahsan/txn-race branch September 30, 2021 20:09
ahsanbarkati added a commit that referenced this pull request Oct 4, 2021
Fix data races.

(cherry picked from commit cf22bf7)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants