Skip to content

Revert and cherry-pick oracle coverage for schema objects#1666

Merged
timsehn merged 1 commit into
masterfrom
test/revert-cherrypick-oracle-schema-objects
Jul 17, 2026
Merged

Revert and cherry-pick oracle coverage for schema objects#1666
timsehn merged 1 commit into
masterfrom
test/revert-cherrypick-oracle-schema-objects

Conversation

@timsehn

@timsehn timsehn commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator

Continues the schema-objects × VC oracle campaign (#1657 add, #1663 merge, #1665 checkout). Fills the revert/cherry-pick gap.

Coverage added (14 scenarios, live-Dolt comparison)

  • Revert: view add/drop commits (drop-revert brings the view back queryable), index add/drop commits (index restored and usable, later data intact), trigger add/drop commits verified by firing behavior, revert-after-modify raising a conflict on both systems, and revert with an unstaged view in the working set (preserved through the revert on both).
  • Cherry-pick: view add/drop across branches, same-name view conflict (both systems error), index add landing usable over the target branch's data, trigger add firing post-pick.
  • Trigger bodies and DROP INDEX use per-dialect dual setups; view/index observability maps sqlite_master ↔ dolt_schemas/information_schema.

No engine changes

All 14 scenarios pass on master — revert and cherry-pick run through the merge machinery that #1663 already fixed for schema objects (including the both-drop resurrection chokepoint). This PR pins that parity so it can't regress silently.

Suite total: 58/58. Sibling suites green: revert oracle 6/6, merge oracle 67/67.

🤖 Generated with Claude Code

Fourteen scenarios against live Dolt: reverting commits that add or drop
views, triggers, and indexes (including revert-after-modify conflicts
and a dirty working set riding through), and cherry-picking the same
deltas across branches (including the same-name view conflict). Trigger
bodies run per-dialect setups. All pass without engine changes — revert
and cherry-pick reuse the merge machinery already fixed for schema
objects.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

Version-Control Performance Ceilings

Runs: median of 3 executions per benchmark, excluding fixture setup. The
working-set fixtures use 800 committed tables with 125 rows each
(100000 rows total); data-dirty cases update 1 row in 40
tables, and schema-dirty cases update 1 row plus add a column in 20 tables.
Branch tests use 300 branches, checkout uses a clean 400-table
branch switch over 100000 rows, and merge
tests use 100000-row tables with 2000 changed or conflicting
rows per side.

Benchmark Median ms Ceiling ms Result
status_clean_many_tables 80 200 PASS
status_dirty_many_tables 83 200 PASS
diff_regular_working_one_table 76 150 PASS
diff_regular_working_many_tables 88 200 PASS
diff_stat_working_many_tables 88 200 PASS
diff_schema_working_many_tables 89 200 PASS
branch_list_many_branches 21 100 PASS
branch_create_delete 24 100 PASS
checkout_branch_clean 53 200 PASS
merge_data_no_conflicts 28 150 PASS
merge_schema_no_conflicts 21 100 PASS
merge_data_conflicts 125 250 PASS
merge_data_conflicts_with_resolve 125 250 PASS

@github-actions

Copy link
Copy Markdown

Sysbench-Style Benchmark: Doltlite vs SQLite

In-Memory

Reads

Test SQLite (us) Doltlite (us) Multiplier
oltp_point_select 22,723 28,408 1.25
oltp_range_select 9,583 12,735 1.33
oltp_sum_range 9,002 12,138 1.35
oltp_order_range 2,448 2,876 1.17
oltp_distinct_range 3,554 4,008 1.13
oltp_index_scan 3,814 5,161 1.35
select_random_points 9,587 10,951 1.14
select_random_ranges 2,815 3,966 1.41
covering_index_scan 4,123 4,052 0.98
groupby_scan 29,220 33,950 1.16
index_join 5,945 7,829 1.32
index_join_scan 3,336 4,626 1.39
types_table_scan 1,044,891 1,253,967 1.20
table_scan 1,181,654 1,349,431 1.14
oltp_read_only 101,846 122,264 1.20
Average 1.24

Writes

Test SQLite (us) Doltlite (us) Multiplier
oltp_bulk_insert 177,051 253,542 1.43
oltp_insert 15,414 29,050 1.88
oltp_update_index 49,721 92,089 1.85
oltp_update_non_index 33,453 58,892 1.76
oltp_delete_insert 43,933 70,461 1.60
oltp_write_only 21,175 44,931 2.12
types_delete_insert 24,404 40,493 1.66
oltp_read_write 68,848 110,157 1.60
Average 1.74

File-Backed

Reads

Test SQLite (us) Doltlite (us) Multiplier
oltp_point_select 91,205 52,731 0.58
oltp_range_select 17,386 15,362 0.88
oltp_sum_range 16,517 14,975 0.91
oltp_order_range 3,275 3,338 1.02
oltp_distinct_range 4,353 4,376 1.01
oltp_index_scan 10,763 8,002 0.74
select_random_points 16,324 13,634 0.84
select_random_ranges 9,679 6,312 0.65
covering_index_scan 11,043 6,779 0.61
groupby_scan 30,110 34,289 1.14
index_join 9,901 9,931 1.00
index_join_scan 4,233 4,972 1.17
types_table_scan 1,048,270 1,268,745 1.21
table_scan 1,173,689 1,353,019 1.15
oltp_read_only 198,190 156,229 0.79
Average 0.91

Writes

Test SQLite (us) Doltlite (us) Multiplier
oltp_bulk_insert 189,116 275,756 1.46
oltp_insert 24,230 35,635 1.47
oltp_update_index 77,271 112,160 1.45
oltp_update_non_index 58,689 79,157 1.35
oltp_delete_insert 69,494 93,190 1.34
oltp_write_only 48,337 63,063 1.30
types_delete_insert 38,970 51,750 1.33
oltp_read_write 92,607 125,612 1.36
Average 1.38

File-Backed (autocommit)

Each statement runs as its own transaction — exposes per-commit
fixed costs that the wrapped-in-BEGIN/COMMIT tests amortize away.
SQLite uses WAL mode with synchronous=FULL in this section so
the comparison uses SQLite's durable WAL autocommit path.

Reads

Reads have no commit cost; these are the same SQL files as the
File-Backed Reads section, included here for symmetry and to
catch any per-statement overhead doltlite pays on the read path.

Test SQLite (us) Doltlite (us) Multiplier
oltp_point_select 46,145 52,556 1.14
oltp_range_select 12,523 15,233 1.22
oltp_sum_range 12,113 14,768 1.22
oltp_order_range 2,841 3,218 1.13
oltp_distinct_range 3,806 4,373 1.15
oltp_index_scan 6,226 7,885 1.27
select_random_points 12,428 13,613 1.10
select_random_ranges 5,300 6,332 1.19
covering_index_scan 6,688 6,661 1.00
groupby_scan 29,899 34,568 1.16
index_join 7,522 9,924 1.32
index_join_scan 3,818 5,051 1.32
types_table_scan 1,060,724 1,276,269 1.20
table_scan 1,206,576 1,378,724 1.14
oltp_read_only 138,527 158,737 1.15
Average 1.18

Writes

Test SQLite (us) Doltlite (us) Multiplier
oltp_bulk_insert_ac 28,115 101,264 3.60
oltp_insert_ac 28,062 117,930 4.20
oltp_update_index_ac 36,337 126,710 3.49
oltp_update_non_index_ac 29,428 112,254 3.81
oltp_delete_insert_ac 30,137 128,859 4.28
oltp_write_only_ac 31,148 120,221 3.86
types_delete_insert_ac 26,993 112,627 4.17
oltp_read_write_ac 36,115 129,288 3.58
Average 3.87

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.

@github-actions

Copy link
Copy Markdown

Sysbench-Style Benchmark (composite PK): Doltlite vs SQLite

Companion to the classic Sysbench-Style Benchmark. Every workload here
runs against tables with a 2-column INTEGER PRIMARY KEY(a, b) WITHOUT ROWID.

Individual ratios gated at 2.5×; section averages gated at 2×. Autocommit writes use 6× / 5×.

In-Memory

Reads

Test SQLite (us) Doltlite (us) Multiplier
oltp_point_select 33,045 37,390 1.13
oltp_range_select 19,009 22,085 1.16
oltp_sum_range 16,935 21,581 1.27
oltp_order_range 3,663 3,978 1.09
oltp_distinct_range 4,666 5,200 1.11
oltp_index_scan 4,594 5,700 1.24
select_random_points 27,049 30,087 1.11
select_random_ranges 7,297 8,374 1.15
covering_index_scan 4,339 4,099 0.94
groupby_scan 38,435 44,114 1.15
index_join 7,949 10,198 1.28
index_join_scan 4,123 5,882 1.43
types_table_scan 1,128,582 1,262,897 1.12
table_scan 1,295,594 1,381,192 1.07
oltp_read_only 145,203 170,825 1.18
Average 1.16

Writes

Test SQLite (us) Doltlite (us) Multiplier
oltp_bulk_insert 244,392 350,359 1.43
oltp_insert 19,178 36,466 1.90
oltp_update_index 66,645 117,673 1.77
oltp_update_non_index 50,598 84,318 1.67
oltp_delete_insert 48,983 96,489 1.97
oltp_write_only 27,137 59,106 2.18
types_delete_insert 32,284 53,362 1.65
oltp_read_write 94,857 151,039 1.59
Average 1.77

File-Backed

Reads

Test SQLite (us) Doltlite (us) Multiplier
oltp_point_select 115,397 66,592 0.58
oltp_range_select 27,983 25,366 0.91
oltp_sum_range 25,781 24,669 0.96
oltp_order_range 4,602 4,390 0.95
oltp_distinct_range 5,614 5,529 0.98
oltp_index_scan 13,172 8,901 0.68
select_random_points 35,784 33,817 0.95
select_random_ranges 15,797 11,445 0.72
covering_index_scan 12,902 7,213 0.56
groupby_scan 38,948 43,553 1.12
index_join 12,602 12,170 0.97
index_join_scan 5,025 6,050 1.20
types_table_scan 1,136,198 1,258,397 1.11
table_scan 1,296,235 1,373,311 1.06
oltp_read_only 265,731 213,318 0.80
Average 0.90

Writes

Test SQLite (us) Doltlite (us) Multiplier
oltp_bulk_insert 258,454 369,410 1.43
oltp_insert 25,427 47,027 1.85
oltp_update_index 94,585 146,023 1.54
oltp_update_non_index 75,784 105,348 1.39
oltp_delete_insert 73,961 119,478 1.62
oltp_write_only 48,391 79,480 1.64
types_delete_insert 48,022 67,272 1.40
oltp_read_write 117,862 172,089 1.46
Average 1.54

File-Backed (autocommit)

Each statement runs as its own transaction — exposes per-commit
fixed costs that the wrapped-in-BEGIN/COMMIT tests amortize away.
SQLite uses WAL mode with synchronous=FULL in this section so
the comparison uses SQLite's durable WAL autocommit path.

Reads

Reads have no commit cost; these are the same SQL files as the
File-Backed Reads section, included here for symmetry and to
catch any per-statement overhead doltlite pays on the read path.

Test SQLite (us) Doltlite (us) Multiplier
oltp_point_select 59,816 67,206 1.12
oltp_range_select 21,910 25,498 1.16
oltp_sum_range 19,937 23,850 1.20
oltp_order_range 3,991 4,309 1.08
oltp_distinct_range 5,024 5,540 1.10
oltp_index_scan 7,396 8,990 1.22
select_random_points 29,827 33,809 1.13
select_random_ranges 10,125 11,358 1.12
covering_index_scan 7,034 7,339 1.04
groupby_scan 38,279 43,444 1.13
index_join 9,633 12,307 1.28
index_join_scan 4,499 6,280 1.40
types_table_scan 1,126,016 1,261,262 1.12
table_scan 1,299,224 1,377,499 1.06
oltp_read_only 185,727 214,495 1.15
Average 1.15

Writes

Test SQLite (us) Doltlite (us) Multiplier
oltp_bulk_insert_ac 16,591 63,020 3.80
oltp_insert_ac 18,535 83,963 4.53
oltp_update_index_ac 20,019 96,030 4.80
oltp_update_non_index_ac 16,677 76,257 4.57
oltp_delete_insert_ac 18,434 85,260 4.63
oltp_write_only_ac 19,140 86,644 4.53
types_delete_insert_ac 16,338 74,086 4.53
oltp_read_write_ac 26,514 95,481 3.60
Average 4.37

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.

@github-actions

github-actions Bot commented Jul 17, 2026

Copy link
Copy Markdown

Sysbench-Style Benchmark (TEXT PK): Doltlite vs SQLite

Companion to the classic Sysbench-Style Benchmark. Every workload here
runs against tables with a 32-char hex TEXT PRIMARY KEY (UUID-shaped).

Individual ratios gated at 2.5×; section averages gated at 2×. Autocommit writes use 6× / 5×.

In-Memory

Reads

Test SQLite (us) Doltlite (us) Multiplier
oltp_point_select 30,177 37,575 1.25
oltp_range_select 13,487 14,610 1.08
oltp_sum_range 11,975 14,681 1.23
oltp_order_range 2,938 3,201 1.09
oltp_distinct_range 3,928 4,297 1.09
oltp_index_scan 4,708 6,517 1.38
select_random_points 18,329 21,780 1.19
select_random_ranges 4,207 5,431 1.29
covering_index_scan 4,770 4,791 1.00
groupby_scan 31,890 35,160 1.10
index_join 7,087 9,439 1.33
index_join_scan 4,452 5,361 1.20
types_table_scan 1,077,660 1,235,761 1.15
table_scan 1,374,806 1,351,434 0.98
oltp_read_only 120,490 139,911 1.16
Average 1.17

Writes

Test SQLite (us) Doltlite (us) Multiplier
oltp_bulk_insert 230,433 363,136 1.58
oltp_insert 22,113 40,369 1.83
oltp_update_index 73,233 136,244 1.86
oltp_update_non_index 48,918 88,911 1.82
oltp_delete_insert 52,397 106,233 2.03
oltp_write_only 29,550 62,957 2.13
types_delete_insert 33,711 55,935 1.66
oltp_read_write 88,725 140,508 1.58
Average 1.81

File-Backed

Reads

Test SQLite (us) Doltlite (us) Multiplier
oltp_point_select 99,792 63,540 0.64
oltp_range_select 20,279 17,231 0.85
oltp_sum_range 19,313 17,623 0.91
oltp_order_range 3,797 3,505 0.92
oltp_distinct_range 4,944 4,720 0.95
oltp_index_scan 11,705 9,047 0.77
select_random_points 27,555 24,762 0.90
select_random_ranges 11,074 7,795 0.70
covering_index_scan 12,025 7,360 0.61
groupby_scan 33,010 35,575 1.08
index_join 10,905 11,425 1.05
index_join_scan 5,388 5,846 1.09
types_table_scan 1,093,540 1,225,843 1.12
table_scan 1,240,922 1,325,211 1.07
oltp_read_only 218,852 176,265 0.81
Average 0.90

Writes

Test SQLite (us) Doltlite (us) Multiplier
oltp_bulk_insert 249,176 391,370 1.57
oltp_insert 40,755 52,411 1.29
oltp_update_index 111,681 169,107 1.51
oltp_update_non_index 100,752 113,589 1.13
oltp_delete_insert 89,593 133,954 1.50
oltp_write_only 88,569 85,017 0.96
types_delete_insert 54,353 74,908 1.38
oltp_read_write 143,995 165,748 1.15
Average 1.31

File-Backed (autocommit)

Each statement runs as its own transaction — exposes per-commit
fixed costs that the wrapped-in-BEGIN/COMMIT tests amortize away.
SQLite uses WAL mode with synchronous=FULL in this section so
the comparison uses SQLite's durable WAL autocommit path.

Reads

Reads have no commit cost; these are the same SQL files as the
File-Backed Reads section, included here for symmetry and to
catch any per-statement overhead doltlite pays on the read path.

Test SQLite (us) Doltlite (us) Multiplier
oltp_point_select 53,499 63,627 1.19
oltp_range_select 16,198 17,208 1.06
oltp_sum_range 15,551 17,460 1.12
oltp_order_range 3,400 3,503 1.03
oltp_distinct_range 4,456 4,767 1.07
oltp_index_scan 7,489 9,144 1.22
select_random_points 22,125 25,395 1.15
select_random_ranges 6,638 7,847 1.18
covering_index_scan 8,154 7,313 0.90
groupby_scan 32,309 35,868 1.11
index_join 9,439 11,372 1.20
index_join_scan 5,084 5,998 1.18
types_table_scan 1,124,653 1,248,570 1.11
table_scan 1,428,819 1,351,782 0.95
oltp_read_only 161,105 177,712 1.10
Average 1.11

Writes

Test SQLite (us) Doltlite (us) Multiplier
oltp_bulk_insert_ac 22,821 80,124 3.51
oltp_insert_ac 24,730 93,080 3.76
oltp_update_index_ac 27,393 112,182 4.10
oltp_update_non_index_ac 22,362 89,978 4.02
oltp_delete_insert_ac 25,448 100,153 3.94
oltp_write_only_ac 24,714 100,746 4.08
types_delete_insert_ac 22,341 93,634 4.19
oltp_read_write_ac 31,447 110,988 3.53
Average 3.89

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.

@github-actions

Copy link
Copy Markdown

Sysbench-Style Benchmark (BLOB PK): Doltlite vs SQLite

Companion to the classic Sysbench-Style Benchmark. Every workload here
runs against tables with a 16-byte big-endian BLOB PRIMARY KEY.

Individual ratios gated at 2.5×; section averages gated at 2×. Autocommit writes use 6× / 5×.

In-Memory

Reads

Test SQLite (us) Doltlite (us) Multiplier
oltp_point_select 31,247 37,545 1.20
oltp_range_select 14,031 14,584 1.04
oltp_sum_range 12,423 14,264 1.15
oltp_order_range 2,986 3,196 1.07
oltp_distinct_range 3,972 4,304 1.08
oltp_index_scan 4,507 6,391 1.42
select_random_points 19,192 21,252 1.11
select_random_ranges 4,294 5,304 1.24
covering_index_scan 4,487 4,774 1.06
groupby_scan 32,211 34,879 1.08
index_join 7,003 9,789 1.40
index_join_scan 4,689 5,514 1.18
types_table_scan 1,161,737 1,233,763 1.06
table_scan 1,220,940 1,350,434 1.11
oltp_read_only 128,489 140,568 1.09
Average 1.15

Writes

Test SQLite (us) Doltlite (us) Multiplier
oltp_bulk_insert 245,161 358,441 1.46
oltp_insert 20,525 40,536 1.97
oltp_update_index 71,307 134,875 1.89
oltp_update_non_index 52,110 87,264 1.67
oltp_delete_insert 52,256 105,190 2.01
oltp_write_only 30,101 63,194 2.10
types_delete_insert 33,293 56,546 1.70
oltp_read_write 89,668 142,279 1.59
Average 1.80

File-Backed

Reads

Test SQLite (us) Doltlite (us) Multiplier
oltp_point_select 101,910 62,750 0.62
oltp_range_select 21,536 17,196 0.80
oltp_sum_range 20,728 17,220 0.83
oltp_order_range 3,853 3,494 0.91
oltp_distinct_range 4,971 4,679 0.94
oltp_index_scan 12,244 9,086 0.74
select_random_points 27,843 24,475 0.88
select_random_ranges 11,413 7,753 0.68
covering_index_scan 12,445 7,378 0.59
groupby_scan 32,814 35,540 1.08
index_join 11,642 11,415 0.98
index_join_scan 5,318 5,773 1.09
types_table_scan 1,067,549 1,230,900 1.15
table_scan 1,272,777 1,326,421 1.04
oltp_read_only 224,279 175,447 0.78
Average 0.87

Writes

Test SQLite (us) Doltlite (us) Multiplier
oltp_bulk_insert 256,312 381,114 1.49
oltp_insert 31,717 51,786 1.63
oltp_update_index 102,652 160,821 1.57
oltp_update_non_index 79,682 107,861 1.35
oltp_delete_insert 79,283 130,060 1.64
oltp_write_only 55,817 84,125 1.51
types_delete_insert 52,505 73,422 1.40
oltp_read_write 124,307 160,916 1.29
Average 1.49

File-Backed (autocommit)

Each statement runs as its own transaction — exposes per-commit
fixed costs that the wrapped-in-BEGIN/COMMIT tests amortize away.
SQLite uses WAL mode with synchronous=FULL in this section so
the comparison uses SQLite's durable WAL autocommit path.

Reads

Reads have no commit cost; these are the same SQL files as the
File-Backed Reads section, included here for symmetry and to
catch any per-statement overhead doltlite pays on the read path.

Test SQLite (us) Doltlite (us) Multiplier
oltp_point_select 55,774 62,173 1.11
oltp_range_select 16,670 17,008 1.02
oltp_sum_range 15,080 16,875 1.12
oltp_order_range 3,449 3,670 1.06
oltp_distinct_range 4,490 4,798 1.07
oltp_index_scan 7,027 9,032 1.29
select_random_points 21,557 24,046 1.12
select_random_ranges 6,624 7,742 1.17
covering_index_scan 7,474 7,146 0.96
groupby_scan 32,583 35,651 1.09
index_join 8,473 11,326 1.34
index_join_scan 4,839 5,714 1.18
types_table_scan 1,053,642 1,213,351 1.15
table_scan 1,216,327 1,322,704 1.09
oltp_read_only 155,954 173,914 1.12
Average 1.13

Writes

Test SQLite (us) Doltlite (us) Multiplier
oltp_bulk_insert_ac 24,349 85,872 3.53
oltp_insert_ac 30,018 107,988 3.60
oltp_update_index_ac 28,499 126,882 4.45
oltp_update_non_index_ac 24,195 108,000 4.46
oltp_delete_insert_ac 26,087 110,936 4.25
oltp_write_only_ac 26,710 115,616 4.33
types_delete_insert_ac 23,290 100,495 4.31
oltp_read_write_ac 32,028 117,549 3.67
Average 4.08

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.

@timsehn
timsehn merged commit 405cbeb into master Jul 17, 2026
31 of 32 checks passed
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.

1 participant