Attribute index changes to their table in the dolt_diff summary#1656
Conversation
Index changes carry no named catalog entry, so the diff summary was blind to them: an index-only commit produced no row at all where Dolt reports the table with schema_change=1, for CREATE and DROP alike, in committed and working diffs, full scans and table_name-filtered scans. The summary now compares each catalog's index schema rows (name and sql) per table and flags the parent when they differ; the unnamed-entry branch in the full scan is also guarded to the master entry so index entries no longer take the dolt_schemas path against garbage roots. The diff oracle gains nine schema-object scenarios verified against real Dolt: index create/drop/mixed-with-data commits, working-set index changes, sibling-noise isolation, filtered scans, view-only and trigger-only commits (locking the already-correct dolt_schemas rows), and no-row-diff assertions for index-only commits. Statements whose syntax diverges between engines run through a new dual-setup helper. 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. |
From the schema-objects-through-add/diff oracle gap survey: the add oracle (516 lines) had zero schema-object coverage and the diff oracle (864 lines) nearly none. Probing the gaps immediately found that the
dolt_diffsummary is blind to index changes — an index-only commit produces no row at all, where Dolt reportst | 0 | 1:table_name-filtered scans — all silentdolt_schemas | 1 | 1) — now locked by oracle scenariosFix: the summary compares each catalog's index schema rows (name + sql) per table and sets
schema_change=1on the parent when they differ — index changes have no named entry, so attribution must go through schema rows, the same lesson as the staging fixes. Also guards the full scan's unnamed-entry branch to the master entry (index entries were previously taking the dolt_schemas comparison path against non-master roots).Coverage: nine new scenarios in
vc_oracle_diff_test.shverified against real Dolt, including a dual-setup helper for statements whose syntax diverges (DROP INDEX … ON t, MySQL trigger bodies). Fail-before: master fails exactly the six index scenarios (57/63); fixed: 63/63.Filed alongside: #1655 —
dolt_statushas the same index blindness (sibling of #1651); its fix targetsdoltlite_status.cand is sequenced after #1653 to avoid conflicts, and the dolt_add oracle scenarios for schema objects (which project dolt_status) queue behind both.Validation: diff oracle 63/63, diff-stat 49/49, diff-tvf 8/8, status 27/27 vs real Dolt; battery 88/88; matrix 38/38; C regression 309,830/309,830.
🤖 Generated with Claude Code