Skip to content

Evict stale cursor after btree_destroy during mvcc checkpoint#6052

Open
harin-ramesh wants to merge 1 commit intotursodatabase:mainfrom
harin-ramesh:checkpoint-stale-cursor-panic-on-page-reuse
Open

Evict stale cursor after btree_destroy during mvcc checkpoint#6052
harin-ramesh wants to merge 1 commit intotursodatabase:mainfrom
harin-ramesh:checkpoint-stale-cursor-panic-on-page-reuse

Conversation

@harin-ramesh
Copy link
Copy Markdown
Contributor

NOTICE:

After btree_destroy frees a root page to the freelist, the cursor cache
still held the old table cursor keyed by that page number. When
btree_create reused the same page for a new index, the cache returned
the stale table cursor (index_info: None), causing a panic in
indexbtree_seek.

Description

Motivation and context

Fixes: #6006

Description of AI Usage

I used AI to navigate the codebase and understand concepts and implementations I was not familiar with.

Copy link
Copy Markdown

@turso-bot turso-bot bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please review @penberg

@harin-ramesh harin-ramesh force-pushed the checkpoint-stale-cursor-panic-on-page-reuse branch 2 times, most recently from 3d0f445 to 5120f7a Compare April 11, 2026 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

mvcc: panics with indexbtree_seek: index_info required

2 participants