Stage shadow tables with their virtual table through named add#1650
Conversation
Virtual tables carry no catalog entry of their own — their commit
content IS the shadow tables — so the entry-based named-add flow
silently ignored them: dolt_add('ft') returned success while staging
nothing, and committed fts/rtree content was whatever the last -Am
commit happened to capture. Staged drops of a vtab errored the same
silent way, leaving the vtab and its shadows in the commit.
Named add of a virtual table now stages every working entry that
sqlite3IsShadowTableOf identifies as its shadow (with their indexes)
and adopts the working master so the vtab's schema row travels;
staging a dropped vtab resolves through the staged catalog's schema
rows and removes the shadow entries with it. Add-time snapshot
semantics hold: rows written after dolt_add stay out of the commit.
The index x VC matrix grows vtab scenarios: named add, -am, staged
drop, old-branch checkout, and clone, over fts5 and rtree.
Fixes #1647
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Version-Control Performance CeilingsRuns: median of 3 executions per benchmark, excluding fixture setup. The
|
Sysbench-Style Benchmark: Doltlite vs SQLiteIn-MemoryReads
Writes
File-BackedReads
Writes
File-Backed (autocommit)Each statement runs as its own transaction — exposes per-commit ReadsReads have no commit cost; these are the same SQL files as the
Writes
100000 rows, median of 5 invocations per test; autocommit writes use 9, workload-only timing via host monotonic clock when available. Performance Ceiling Check (2.5x individual, 2x average; autocommit writes: 6x / 5x)All tests within ceilings. |
Sysbench-Style Benchmark (BLOB PK): Doltlite vs SQLiteCompanion to the classic Sysbench-Style Benchmark. Every workload here In-MemoryReads
Writes
File-BackedReads
Writes
File-Backed (autocommit)Each statement runs as its own transaction — exposes per-commit ReadsReads have no commit cost; these are the same SQL files as the
Writes
100000 rows, median of 5 invocations per test; autocommit writes use 9, workload-only timing via host monotonic clock when available. Performance Ceiling Check (2.5x individual, 2x average; autocommit writes: 6x / 5x)All tests within ceilings. |
Sysbench-Style Benchmark (TEXT PK): Doltlite vs SQLiteCompanion to the classic Sysbench-Style Benchmark. Every workload here In-MemoryReads
Writes
File-BackedReads
Writes
File-Backed (autocommit)Each statement runs as its own transaction — exposes per-commit ReadsReads have no commit cost; these are the same SQL files as the
Writes
100000 rows, median of 5 invocations per test; autocommit writes use 9, workload-only timing via host monotonic clock when available. Performance Ceiling Check (2.5x individual, 2x average; autocommit writes: 6x / 5x)All tests within ceilings. |
Sysbench-Style Benchmark (composite PK): Doltlite vs SQLiteCompanion to the classic Sysbench-Style Benchmark. Every workload here In-MemoryReads
Writes
File-BackedReads
Writes
File-Backed (autocommit)Each statement runs as its own transaction — exposes per-commit ReadsReads have no commit cost; these are the same SQL files as the
Writes
100000 rows, median of 5 invocations per test; autocommit writes use 9, workload-only timing via host monotonic clock when available. Performance Ceiling Check (2.5x individual, 2x average; autocommit writes: 6x / 5x)All tests within ceilings. |
Fixes #1647.
The bug ran deeper than filed: virtual tables have no catalog entry at all (schema row only), so the entry-based named-add flow silently ignored them entirely —
dolt_add('ft')returned success while staging nothing, and staged drops of a vtab failed just as silently, leaving the vtab and shadows in the commit. Committed fts/rtree content was whatever the last-Amcommit happened to capture.The fix, in the named-add path (same functions as #1643's index staging):
sqlite3IsShadowTableOfidentifies as its shadow (plus their indexes), and adopts the working master so the vtab's schema row travels.dolt_addstay out of the commit (verified).The index×VC matrix grows five vtab scenarios — named add,
-am, staged drop, old-branch checkout, and clone, over both fts5 and rtree. Fail-before/pass-after: pre-fix binary fails the three staging scenarios (35/38), fixed binary passes 38/38.Validation: matrix 38/38, shell battery 88/88, C regression 309,830/309,830 (
DOLTLITE_PROLLY_CHECK=1).Remaining sibling in the class: #1648 (view/trigger ride-along on master adoption) stays filed with analysis — its fix is a staging-model design change, not a patch.
🤖 Generated with Claude Code