Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,28 @@ jobs:
./target/release/turso_whopper ${{ matrix.profile.args }} || exit 1
done

concurrent-simulator-windows:
runs-on: windows-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
prefix-key: "v1-rust"
cache-on-failure: true
- uses: "./.github/shared/setup-sccache"
- name: Run Windows concurrent simulator multiprocess regressions
run: cargo test -q -p turso_whopper --test regression_tests
- name: Run Windows concurrent simulator cross-platform regression
run: cargo test -q -p turso_whopper --test regression_tests_cross_platform
- name: Run Windows CLI multiprocess VFS regression
run: cargo test -q -p turso_cli input::tests::experimental_win_iocp_backend_is_available_for_path_databases -- --exact
- name: Run Windows core multiprocess regressions
run: cargo test -q -p turso_core --features "fs experimental_win_iocp" multiprocess_tests:: -- --nocapture
- name: Run Windows multiprocess startup smoke
run: cargo run -q -p turso_whopper -- --mode fast --multiprocess --connections-per-process 1 --processes 2 --max-steps 0

test-sqlite:
runs-on: blacksmith-4vcpu-ubuntu-2404
timeout-minutes: 30
Expand Down
2 changes: 1 addition & 1 deletion cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ bytes = "1.11.1"
itertools.workspace = true

[features]
default = ["io_uring", "mimalloc"]
default = ["io_uring", "mimalloc", "experimental_win_iocp"]
io_uring = ["turso_core/io_uring"]
experimental_win_iocp = ["turso_core/experimental_win_iocp"]
tracing_release = ["turso_core/tracing_release"]
Expand Down
5 changes: 4 additions & 1 deletion cli/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,10 @@ pub struct Opts {
pub experimental_attach: bool,
#[clap(long, help = "Enable experimental generated columns feature")]
pub experimental_generated_columns: bool,
#[clap(long, help = "Enable experimental multiprocess WAL coordination")]
#[clap(
long,
help = "Enable experimental multiprocess WAL coordination (on Windows, use --vfs experimental_win_iocp)"
)]
pub experimental_multiprocess_wal: bool,
#[cfg(feature = "mvcc_repl")]
#[clap(long, help = "Start MVCC concurrent transaction harness")]
Expand Down
12 changes: 12 additions & 0 deletions cli/input.rs
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,18 @@ pub fn get_io(db_location: DbLocation, io_choice: &str) -> anyhow::Result<Arc<dy
})
}

#[cfg(all(test, target_os = "windows", feature = "experimental_win_iocp"))]
mod tests {
use super::{DbLocation, get_io};

#[test]
fn experimental_win_iocp_backend_is_available_for_path_databases() {
let io = get_io(DbLocation::Path, "experimental_win_iocp")
.expect("windows cli should construct the experimental_win_iocp backend");
drop(io);
}
}

pub struct ApplyWriter<'a> {
target: &'a Arc<turso_core::Connection>,
// accumulate raw bytes to support non-utf8 BLOB types
Expand Down
3 changes: 3 additions & 0 deletions core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ optimizer_params = ["serde", "dep:serde_json"]
[target.'cfg(target_os = "windows")'.dependencies]
windows-sys = { version = "0.61.2", features = [
"Win32_System_IO",
"Win32_System_Memory",
"Win32_System_SystemInformation",
"Win32_System_Threading",
"Win32_Storage_FileSystem",
"Win32_Security",
"Win32_System_Diagnostics_Debug",
Expand Down
1 change: 1 addition & 0 deletions core/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ use std::{env, fs};
fn main() {
cfg_aliases! {
injected_yields: { any(feature = "test_helper", feature = "simulator") },
host_shared_wal: { all(any(unix, target_os = "windows"), target_pointer_width = "64") },
}

// Ensure Cargo reruns when this script or the reproducibility seed changes.
Expand Down
2 changes: 1 addition & 1 deletion core/connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1596,7 +1596,7 @@ impl Connection {
.block(|| pager.checkpoint(mode, SyncMode::Full, true))
}

#[cfg(all(feature = "simulator", target_pointer_width = "64", unix))]
#[cfg(all(feature = "simulator", target_pointer_width = "64", host_shared_wal))]
pub fn install_unpublished_backfill_proof_for_testing(
&self,
upper_bound_inclusive: u64,
Expand Down
Loading
Loading