Skip to content

core/mvcc: rename IndexShadowFinger to IndexShadowScan - #12

Closed
pereman2 wants to merge 2 commits into
worktrees/rename-mvcc-finger-base-e56afrom
worktrees/rename-mvcc-finger-e56a
Closed

pereman2 wants to merge 2 commits into
worktrees/rename-mvcc-finger-base-e56afrom
worktrees/rename-mvcc-finger-e56a

Conversation

@pereman2

@pereman2 pereman2 commented Sep 16, 2026

Copy link
Copy Markdown
Owner

Problem statement

Forward index scans used IndexShadowFinger as a merge cursor over index_rows. It moves with the B-tree cursor and answers whether an MVCC version hides that B-tree row, instead of calling index_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. MvccLazyCursor also stored index_finger_epoch beside it. Those two fields had to stay in sync.

Changes

I renamed the type to IndexShadowScan and 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.

Open in Web Open in Cursor 

cursoragent and others added 2 commits September 16, 2026 13:30
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>
@pereman2 pereman2 closed this Sep 16, 2026
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