Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Feature/materialized view commitment #1071
… MARF handle, and add a way to begin, insert-batch, and commit key/value pairs as strings. The insert-batch will only calculate the ART hash once (unlike doing many inserts individually). Also, add a stress-test that test the MARF across many different forks by building a 256-node binary tree out of blocks, and disable long-running tests.
…T to disk by writing it to a temporary file and rename-ing it into place. Adds an fsync() to make the disk data durable, and adds a method for identifying in-progress but interrupted writes.
@@ Coverage Diff @@ ## develop #1071 +/- ## ========================================== + Coverage 77.13% 79.83% +2.7% ========================================== Files 91 94 +3 Lines 17761 23139 +5378 ========================================== + Hits 13700 18474 +4774 - Misses 4061 4665 +604
kantai left a comment •
This code looks good to me -- the MARF looks like the perfect data structure for what we need, and I'm excited to be integrating this.
I have a couple comments that should be addressed before merging:
Thanks for your feedback @kantai!
Agreed. I will clean this up.
Yup, will fix those.
Yes, but I don't think this can be helped. Different callers need to be able to do different things when the cursor cannot make progress, and when those things are done, the TrieCursor needs to be "restarted" so it can continue walking along the Trie path -- especially if the Trie structure itself changes in-between calls to
Yeah, in retrospect, this would have been a better approach. I'll go ahead and make this change.
Please see my inline comment above.
Yeah, getting rid of Vecs entirely would be good -- they're heap-allocated, so mutating one potentially means an expensive call to
…couldn't finish walking to the next node (call this a CursorError). Use this for following backptrs and COW'ing nodes instead of trying to deduce what happened.
So, what I've done with this now is I've made it so there are three explicit
So for this, I made it so TrieCursor's