Skip to content

Fix CI#6725

Draft
LeMikaelF wants to merge 5 commits intomainfrom
fix-ci
Draft

Fix CI#6725
LeMikaelF wants to merge 5 commits intomainfrom
fix-ci

Conversation

@LeMikaelF
Copy link
Copy Markdown
Collaborator

@LeMikaelF LeMikaelF commented May 6, 2026

Description

CI on main is failing because (1) I did a few bad merges by accident, and (2) we re-enabled some tests in CI in #6692. In this PR:

The commits can be reviewed individually.

LeMikaelF and others added 3 commits May 6, 2026 14:36
Compiling on MacOS was giving this error:

warning: limbo_sqlite_test_ext@0.6.0-pre.28: /Library/Developer/CommandLineTools/usr/bin/ar: illegal option -- D
Adds a new `--mode recovery-bugs` profile to whopper biased toward catching
MVCC schema-recovery bugs (e.g. PR #6628's HashMap-iteration auto-index swap).
The profile is composed of:

- SchemaBias struct on WhopperOpts with knobs for ipk_prob (probability of
  TEXT/BLOB PRIMARY KEY → non-rowid PK auto-index), unique_col_autoindex_prob,
  num_tables_range, num_columns_range, and seed_rows_per_table. Defaults match
  existing fast/chaos/ragnarok behavior; recovery-bugs sets aggressive values.
- disable_mvcc_auto_checkpoint flag → calls MvStore::set_checkpoint_threshold(-1)
  so schema CREATE rows stay in the logical log for replay rather than being
  flushed early to the on-disk btree.
- crash_like_reopen flag → drops fiber connections without graceful close to
  preserve uncheckpointed log state across reopens.
- default_reopen_probability field → CLI fallback when --reopen-probability is
  not pinned explicitly.
- create_initial_schema honors SchemaBias for both single-process and
  multiprocess paths; multiprocess uses the default bias.
- seed_insert_sql produces deterministic per-table seed rows so the simulator's
  read/write workloads have actual data to operate on (prevents tables from
  staying empty when the random INSERT generator collides on UNIQUE).

Two related infrastructure changes:

- `pub fn turso_core::clear_database_registry()` exposes the equivalent of
  the private `DATABASE_MANAGER.lock().clear()` used by `MvccTestDbNoConn::
  restart_result`. Whopper's reopen calls it so the next Database open re-runs
  MVCC recovery rather than handing back the cached entry — required for the
  recovery-class bug paths to actually fire on each reopen cycle.
- Whopper's main step loop now tolerates `LimboError::Constraint` and
  `LimboError::ForeignKeyConstraint` the same way it tolerates Busy/Schema
  errors: rolls back if in a transaction, otherwise drops the txn_id and
  continues. UNIQUE collisions from the random INSERT generator are expected
  during fuzzing; they shouldn't crash the simulator.

Validated end-to-end: with PR #6628 reverted, --mode recovery-bugs catches
the auto-index swap within ~5 iterations via `Corrupt: IdxDelete` from
workload UPDATE/DELETE operations against the swapped index. With both PR
#6628 and the companion concurrent-tx serialization fix in place, 30/30
seeds pass cleanly.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Comment thread core/vdbe/execute.rs
for i in 0..column_count {
let cols_view = btree.columns();
cols_view[i]
if let Some(new_sql) = cols_view[i]
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Apparently clippy thinks that mixing imperative and functional styles and obscuring the flow of information is the way to go.

})
.expect("create seeded multiprocess whopper");
let db_path = whopper.db_path().to_path_buf();
let table_name = "simple_kv_28209";
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

These tests rely on whopper's interaction generation. My guess is that whopper has changed since the tests were written. This is a brittle testing strategy, but it'll have to do for now.

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.

1 participant