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 race condition in handing out value handle IDs for the LMDB backing store #4283

Merged
merged 1 commit into from
Jan 17, 2023

Conversation

jorisdral
Copy link
Contributor

@jorisdral jorisdral commented Jan 17, 2023

Description

A race condition led to IDs for LMDB value handles being handed out more than once. Computing/handing out IDs is now atomic, so the race condition should not occur anymore.

Checklist

  • Branch
    • Commit sequence broadly makes sense
    • Commits have useful messages
    • The documentation has been properly updated
    • New tests are added if needed and existing tests are updated
    • If this branch changes Consensus and has any consequences for downstream repositories or end users, said changes must be documented in interface-CHANGELOG.md
    • If this branch changes Network and has any consequences for downstream repositories or end users, said changes must be documented in interface-CHANGELOG.md
    • If serialization changes, user-facing consequences (e.g. replay from genesis) are confirmed to be intentional.
  • Pull Request
    • Self-reviewed the diff
    • Useful pull request description at least containing the following information:
      • What does this PR change?
      • Why these changes were needed?
      • How does this affect downstream repositories and/or end-users?
      • Which ticket does this PR close (if any)? If it does, is it linked?
    • Reviewer requested

A race condition led to IDs for LMDB value handles being handed out
more than once. Computing/handing out IDs is now atomic, so the
race condition should not occur anymore.
@jorisdral jorisdral added bug Something isn't working consensus issues related to ouroboros-consensus UTxO-HD 📒💽 labels Jan 17, 2023
@jorisdral jorisdral requested a review from nfrisby as a code owner January 17, 2023 09:07
@jorisdral jorisdral self-assigned this Jan 17, 2023
@jorisdral jorisdral removed the request for review from nfrisby January 17, 2023 09:07
Copy link
Contributor

@jasagredo jasagredo left a comment

Choose a reason for hiding this comment

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

Looks good, thanks!!

Copy link
Member

@dnadales dnadales left a comment

Choose a reason for hiding this comment

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

Thanks!

@jasagredo jasagredo merged commit 8a6999e into feature/utxo-hd Jan 17, 2023
@jasagredo jasagredo deleted the jdral/fix-lmdb-race-condition branch January 17, 2023 13:24
jasagredo added a commit that referenced this pull request Jan 18, 2023
…dition

Fix race condition in handing out value handle IDs for the LMDB backing store
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working consensus issues related to ouroboros-consensus UTxO-HD 📒💽
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants