Skip to content

feat: transactions - #13

Merged
fominok merged 18 commits into
masterfrom
feat-transactions-2
Jan 11, 2022
Merged

feat: transactions#13
fominok merged 18 commits into
masterfrom
feat-transactions-2

Conversation

@antouhou

@antouhou antouhou commented Dec 24, 2021

Copy link
Copy Markdown
Contributor

The logic of Merk::clear is not compatible with transactions really - something had to be redone.
Merk::clear consumes itself. It also creates a batch. With transactions, the batch is either Batch or Transaction. But transaction borrows storage, and thus compiler thinks that storage lives less than the transaction.

All tests are passing, except the ones that delete subtrees. That’s because I’ve commented out Merk::clear method as explained above.
I’ve also left a pretty self-explanatory doc comment on GroveDB::start_transaction. Run cargo doc --open to check it out. Please take a look at it! It is a bit ugly, but it works!

Happy new year! 🥂

@antouhou
antouhou marked this pull request as ready for review December 31, 2021 16:06
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