pedrocarlo
4cbf861699
use a different seed for gen_rng
2025-09-25 01:20:35 -03:00
pedrocarlo
44c08c02d1
do not shadow interactions when generating the next plan, only after the interaction is ran
2025-09-23 21:57:06 -03:00
pedrocarlo
69d09bcf8c
modify code to use runtime generation
2025-09-23 21:57:06 -03:00
pedrocarlo
6569d27bdc
compare rows order insensitively for differential testing
2025-09-22 15:33:37 -03:00
pedrocarlo
2cd7c68c35
adjust property generation to not panic by always having some property to select from
2025-09-22 15:24:30 -03:00
pedrocarlo
7d1f23dd3a
better diffing with similar crate
2025-09-22 15:24:30 -03:00
pedrocarlo
05034e1f9d
instead of incrementing interaction counter, just substitue the current state
2025-09-22 15:24:30 -03:00
pedrocarlo
021d5d272a
refactor shadowing code to take into account snapshot isolation
2025-09-20 12:01:07 -03:00
pedrocarlo
0293c32616
disable integrity check and indexes when using mvcc
2025-09-20 11:52:15 -03:00
pedrocarlo
13f36880f8
adjust generation code to use the context from the current connection index instead of the whole database
2025-09-20 11:52:15 -03:00
pedrocarlo
c4843d6a6e
refactor SimulatorEnv to hold committed tables and separate connection tables for snapshot isolation
2025-09-20 11:52:15 -03:00
pedrocarlo
8b05dcba21
add 10 connections to base profiles
2025-09-17 10:49:24 -03:00
pedrocarlo
6039a30222
fix double create failure
2025-09-17 10:49:24 -03:00
pedrocarlo
04154bf368
simplify code for doublecheck testing
2025-09-17 10:49:24 -03:00
pedrocarlo
f95ac87f06
simplify code for differential testing
2025-09-17 10:49:24 -03:00
pedrocarlo
4d9e676f65
simplify run_simualtion signature + remove watch mode file as it shares logic with default run simulation logic
2025-09-17 10:49:24 -03:00
pedrocarlo
b98c22a90e
run simulation on the total list of interactions to avoid recomputing whole vec of interactions on each loop + change state management in preparation for multiple connections change
2025-09-17 10:49:24 -03:00
pedrocarlo
faf38fe196
add connection Index to interaction struct
2025-09-17 10:49:24 -03:00
pedrocarlo
77cab30c5b
add connection index to interaction
2025-09-17 10:49:24 -03:00
Pekka Enberg
860627942a
Merge 'core: Rename IO::run_once() to IO::step()' from Pekka Enberg
...
Rust Benchmarks+Nyrkiö / tpc-h (push) Waiting to run
Build & publish @tursodatabase/sync / stable - x86_64-unknown-linux-gnu - node@20 (push) Waiting to run
Build & publish @tursodatabase/sync / Test turso-sync-js on Linux-x64-gnu - node@20 (push) Blocked by required conditions
Build & publish @tursodatabase/sync / Publish (push) Blocked by required conditions
Build & publish @tursodatabase/database / stable - wasm32-wasip1-threads - node@20 (push) Waiting to run
Build & publish @tursodatabase/database / Publish (push) Blocked by required conditions
Build & publish @tursodatabase/database / stable - aarch64-apple-darwin - node@20 (push) Waiting to run
Build & publish @tursodatabase/database / stable - aarch64-unknown-linux-gnu - node@20 (push) Waiting to run
Build & publish @tursodatabase/database / stable - x86_64-pc-windows-msvc - node@20 (push) Waiting to run
Build & publish @tursodatabase/database / stable - x86_64-unknown-linux-gnu - node@20 (push) Waiting to run
Build & publish @tursodatabase/database / Test bindings on Linux-x64-gnu - node@20 (push) Blocked by required conditions
Python / configure-strategy (push) Waiting to run
Python / test (push) Blocked by required conditions
Python / lint (push) Waiting to run
Python / linux (x86_64) (push) Waiting to run
Python / macos-arm64 (aarch64) (push) Waiting to run
Python / sdist (push) Waiting to run
Python / Release (push) Blocked by required conditions
Rust / cargo-fmt-check (push) Waiting to run
Rust / build-native (blacksmith-4vcpu-ubuntu-2404) (push) Waiting to run
Rust / build-native (macos-latest) (push) Waiting to run
Rust / build-native (windows-latest) (push) Waiting to run
Rust / clippy (push) Waiting to run
Rust / simulator (push) Waiting to run
Rust / test-limbo (push) Waiting to run
Rust / test-sqlite (push) Waiting to run
Rust Benchmarks+Nyrkiö / bench (push) Waiting to run
Rust Benchmarks+Nyrkiö / clickbench (push) Waiting to run
Rust Benchmarks+Nyrkiö / tpc-h-criterion (push) Waiting to run
Rust Benchmarks+Nyrkiö / vfs-bench-compile (push) Waiting to run
The `run_once()` name is just a historical accident. Furthermore, it now
started to appear elsewhere as well, so let's just call it IO::step() as
we should have from the beginning.
Closes #3001
2025-09-10 15:11:28 +03:00
Pekka Enberg
e0a3d2741b
Merge 'simulator: Clean up code to use extract_if()' from Pavan Nambi
...
As we are in rust 1.88 rn, we can safely use extract_if
Reviewed-by: Pedro Muniz (@pedrocarlo)
Closes #2911
2025-09-10 14:59:42 +03:00
Pekka Enberg
2131a04b7d
core: Rename IO::run_once() to IO::step()
...
The `run_once()` name is just a historical accident. Furthermore, it now
started to appear elsewhere as well, so let's just call it IO::step() as we
should have from the beginning.
2025-09-10 14:36:02 +03:00
pedrocarlo
5f24ff6e45
fix non determinism by using IndexSet for order preserving iteration
2025-09-05 02:00:18 -03:00
Pavan-Nambi
b85233059a
use extract_if
2025-09-04 08:59:18 +05:30
Pekka Enberg
8204fbc8ec
simulator: Fix 64-bit offset build failures
...
Fix brekage from first merging commit d959319b ("Merge 'Use u64 for file
offsets in I/O and calculate such offsets in u64' from Preston Thorpe")
and then commit 6591b66c ("Merge 'Simulate I/O in memory' from Pedro
Muniz"), which was unaware of the changes.
2025-09-02 14:14:04 +03:00
Pekka Enberg
6591b66c3d
Merge 'Simulate I/O in memory' from Pedro Muniz
...
Revives the `MemorySim` PR and fixes a page cache issue where we could
have a unlocked and unloaded page in the page cache after a FaultyQuery.
The page would continue in the cache and could affect other queries as
the `page_cache` is at the `Connection` level.
Depends on #2785
Closes #2693
2025-09-02 13:28:48 +03:00
Pekka Enberg
d959319b42
Merge 'Use u64 for file offsets in I/O and calculate such offsets in u64' from Preston Thorpe
...
Using `usize` to compute file offsets caps us at ~16GB on 32-bit
systems. For example, with 4 KiB pages we can only address up to 1048576
pages; attempting the next page overflows a 32-bit usize and can wrap
the write offset, corrupting data. Switching our I/O APIs and offset
math to u64 avoids this overflow on 32-bit targets
Closes #2791
2025-09-02 09:06:49 +03:00
pedrocarlo
51a54d3c33
Fd should be part of Operation struct
2025-09-01 16:53:07 -03:00
pedrocarlo
1eb1171f55
do not fault on Fsync until we correctly define the expected behaviour in the simulator
2025-09-01 14:12:11 -03:00
pedrocarlo
c158db072b
inject fault in the IO Operation in the MemorySim
2025-09-01 14:12:11 -03:00
pedrocarlo
bd8cfe40f1
impl remove_file for MemoryIO + skip completion if finished
2025-09-01 14:12:11 -03:00
pedrocarlo
cc3488bba0
print path in stats for memory IO
2025-09-01 14:12:11 -03:00
pedrocarlo
fd4e74929a
Cli option to enable memory IO
2025-09-01 14:12:11 -03:00
pedrocarlo
117451fba1
impl WriteV for MemorySim
2025-09-01 14:12:11 -03:00
pedrocarlo
24c0d24be6
impl Truncate for MemorySim
2025-09-01 11:11:25 -03:00
pedrocarlo
40de4c0606
initial impl for MemorySim
2025-09-01 11:11:25 -03:00
pedrocarlo
8c7da3a704
impl SimIO for SimulatorIO
2025-09-01 11:11:03 -03:00
pedrocarlo
d8e9f145e6
create SimIO trait
2025-09-01 11:10:40 -03:00
pedrocarlo
5881ee71d6
clippy
2025-08-30 12:21:37 -03:00
pedrocarlo
961c0cd282
script to save JsonSchema for editor integration
2025-08-30 12:17:50 -03:00
pedrocarlo
61fa7546c1
fold some SimulatorOpts fields to Profile
2025-08-30 11:31:52 -03:00
pedrocarlo
2f237fdcfd
adjust remaining calculation to use the profile
2025-08-30 11:31:52 -03:00
pedrocarlo
962666831b
read Profile file from path or use predefined profiles
2025-08-30 11:31:52 -03:00
pedrocarlo
e0552629e3
create Generation Options structs
2025-08-30 11:31:52 -03:00
pedrocarlo
bcd70488ae
add sqlite integrity check back
2025-08-29 12:25:27 -03:00
PThorpe92
0a56d23402
Use u64 for file offsets in IO and calculate such offsets in u64
2025-08-28 09:44:00 -04:00
pedrocarlo
8010b7d0c7
make simulator use sql_generation crate as dependency
2025-08-25 22:59:31 -03:00
Jussi Saurio
cc643362a4
sim: remove "run_once faults"
...
This kind of fault does not semantically represent anything real,
since we already have fault injection for every concrete IO operation
like reading, writing, syncing and so forth.
Moreover, having this feature is the direct cause of the false positive
simulator failure as reported in issue #2727 . There, a "run_once fault"
happened immediately after we fsynced following an INSERT, which caused
the simulator to think the INSERT failed, and later a sim assertion failed
because the on-disk database had 1 more row than it thought it would.
2025-08-22 10:13:06 +03:00
Nikita Sivukhin
c771487933
add remove_file method to the IO
2025-08-21 14:51:02 +04:00
Jussi Saurio
e6adb8992b
sim: use 'git rev-parse --show-toplevel' for getting base dir
2025-08-20 09:58:21 +03:00