Conversation
Finger was a merge-join metaphor that hid the type's job: a monotonic forward scan over index_rows that answers btree shadow checks. Fold index_rows_epoch into the type so MvccLazyCursor no longer carries a second field that must stay in sync with the scan position. Tests: cargo test -p turso_core test_index_shadow_scan_no_spurious_dep_on_stepped_over_key Co-authored-by: Pere Diaz Bou <pereman2@users.noreply.github.com>
The seed block exists so the skiplist guard drops before later db borrows. There is no step method. Co-authored-by: Pere Diaz Bou <pereman2@users.noreply.github.com>
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.
Problem statement
Forward index scans used
IndexShadowFingeras a merge cursor overindex_rows. It moves with the B-tree cursor and answers whether an MVCC version hides that B-tree row, instead of callingindex_rows.get()on every row.Finger is a merge-join name. It collides with fingerprint, and the original merge joked about
_fingering_ on index rows.MvccLazyCursoralso storedindex_finger_epochbeside it. Those two fields had to stay in sync.Changes
I renamed the type to
IndexShadowScanand moved the epoch onto it. The cursor now has one field,index_shadow_scan. Callers and the tursodatabase#7504 and tursodatabase#7578 tests use the new name.Seek and backward scans still call
query_btree_version_is_valid.