Checks to ensure transactions execute in the context of their originating stores#4297
Merged
pwojcikdev merged 3 commits intonanocurrency:developfrom Oct 8, 2023
Merged
Conversation
clemahieu
reviewed
Sep 29, 2023
|
|
||
| MDB_txn * nano::store::lmdb::env::tx (store::transaction const & transaction_a) const | ||
| { | ||
| debug_assert (transaction_a.store_id () == store_id); |
Contributor
There was a problem hiding this comment.
This looks like the critical check. Would it be enough to use an lmdb::env * as the store_id or does the dispenser give other benefits?
Contributor
Author
There was a problem hiding this comment.
The dispenser is used quite broadly on the tracking/logging branch. Naive tracking via pointers to '*this' might work in some cases (like here), but it completely breaks when objects are dynamically allocated.
clemahieu
approved these changes
Oct 2, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A small wallet store cleanup and changes that ensure (lmdb) transactions always execute in the context of their original environment.