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

samplecode: fix possible deadlock in db-server #269

Merged
merged 1 commit into from
Oct 23, 2020

Conversation

BurtonQin
Copy link
Contributor

In samplecode/db-proxy/db-server/src/server/mod.rs:
There are two db.read() in fn fn db_get(), which may cause deadlock when interleaved by a db.write() (e.g. in db_put() or db_delete()) from another thread.

The fix is to remove the redundant db.read().

Copy link
Contributor

@dingelish dingelish left a comment

Choose a reason for hiding this comment

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

sgtm

@dingelish dingelish merged commit d949967 into apache:master Oct 23, 2020
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