Skip to content

MVCC: remap root page ids so that we don't miss rows on recovery#6361

Open
pedrocarlo wants to merge 5 commits intotursodatabase:mainfrom
pedrocarlo:remap-ids
Open

MVCC: remap root page ids so that we don't miss rows on recovery#6361
pedrocarlo wants to merge 5 commits intotursodatabase:mainfrom
pedrocarlo:remap-ids

Conversation

@pedrocarlo
Copy link
Copy Markdown
Collaborator

Description

I'm not that aware of how exactly MVCC recovery is supposed to work, but it seems that it relies on the root_page values to recover the logical log. However, it seems there is some way that we can diverge table_ids in the log file and in-memory so this code just attempts at making sure we use the same table ids to avoid losing rows.

Currently rebased on top of #6342

Motivation and context

Fix panics and losing rows.

Description of AI Usage

Did the reproducers first with AI and then explored the fix with AI as well

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 @pereman2

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Apr 10, 2026

Merging this PR will improve performance by 15.17%

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

⚡ 1 improved benchmark
✅ 310 untouched benchmarks
⏩ 105 skipped benchmarks1

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Simulation format_float_zero 1,107.2 ns 961.4 ns +15.17%

Comparing pedrocarlo:remap-ids (5c675c2) with main (4c8390b)

Open in CodSpeed

Footnotes

  1. 105 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

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.

2 participants