Conversation
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>
LeMikaelF
commented
May 6, 2026
| for i in 0..column_count { | ||
| let cols_view = btree.columns(); | ||
| cols_view[i] | ||
| if let Some(new_sql) = cols_view[i] |
Collaborator
Author
There was a problem hiding this comment.
Apparently clippy thinks that mixing imperative and functional styles and obscuring the flow of information is the way to go.
LeMikaelF
commented
May 6, 2026
| }) | ||
| .expect("create seeded multiprocess whopper"); | ||
| let db_path = whopper.db_path().to_path_buf(); | ||
| let table_name = "simple_kv_28209"; |
Collaborator
Author
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.