From be383ba96b7be17825dec09084adbf1d0f9d0c99 Mon Sep 17 00:00:00 2001 From: Jeremy Harris Date: Wed, 25 Jun 2025 17:10:15 -0600 Subject: [PATCH 01/10] Bump Cargo.lock --- Cargo.lock | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Cargo.lock b/Cargo.lock index 93d0bb63..0f64f4a8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -960,6 +960,8 @@ dependencies = [ [[package]] name = "muxio" version = "0.8.0-alpha" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "438fae9dabf5fced61fc02c8220dfd3d32f4c3fe920fb86a2948633a0bbaeb1c" dependencies = [ "chrono", "once_cell", @@ -969,6 +971,8 @@ dependencies = [ [[package]] name = "muxio-rpc-service" version = "0.8.0-alpha" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aaaaa655085a8524e405ace03657c518f7ed39ae4af40a5424f466b9180ca9e5" dependencies = [ "async-trait", "futures", @@ -980,6 +984,8 @@ dependencies = [ [[package]] name = "muxio-rpc-service-caller" version = "0.8.0-alpha" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "061ca0a702e645d7d48867c36ed64b7e98eb1398a3c7fb2eef1dc63a990ec309" dependencies = [ "async-trait", "futures", @@ -991,6 +997,8 @@ dependencies = [ [[package]] name = "muxio-rpc-service-endpoint" version = "0.8.0-alpha" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a531065063b4568f4c4bba14f461f58dde86a89c44f3f1d2b4e155614602f6b3" dependencies = [ "async-trait", "futures", @@ -1004,6 +1012,8 @@ dependencies = [ [[package]] name = "muxio-tokio-rpc-client" version = "0.8.0-alpha" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0718e9399969c331e8f4ef2e8db9778b319f47cee541517b0192216a273554ea" dependencies = [ "async-trait", "bytes", @@ -1020,6 +1030,8 @@ dependencies = [ [[package]] name = "muxio-tokio-rpc-server" version = "0.8.0-alpha" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3bf8cd76c1daac24a233e5bf5c3d55e4dcbf5cdaa8c7df37f6bf02381a37f7b0" dependencies = [ "async-trait", "axum", From 06067b2c3e397ad6e455253252327f5cc43867ac Mon Sep 17 00:00:00 2001 From: Jeremy Harris Date: Thu, 26 Jun 2025 08:14:50 -0600 Subject: [PATCH 02/10] Add TODO --- .../bindings/python-ws-client/src/base_ws_client_py.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/experiments/bindings/python-ws-client/src/base_ws_client_py.rs b/experiments/bindings/python-ws-client/src/base_ws_client_py.rs index 4942358a..43b6a0a5 100644 --- a/experiments/bindings/python-ws-client/src/base_ws_client_py.rs +++ b/experiments/bindings/python-ws-client/src/base_ws_client_py.rs @@ -11,6 +11,11 @@ use std::time::Duration; use tokio::runtime::{Builder, Runtime}; use tokio::time::timeout; +// TODO: Borrow configuration props from MySQL +// connection_timeout=10, # Timeout for the connection attempt (in seconds) +// read_timeout=30, # Timeout for waiting for response from server (in seconds) +// write_timeout=30 # Timeout for sending data to server (in seconds) + #[pyclass(subclass)] pub struct BaseDataStoreWsClient { ws_client: Arc, From d17257fcda3cb47d248f55044da4cd1ad882b797 Mon Sep 17 00:00:00 2001 From: Jeremy Harris Date: Fri, 27 Jun 2025 12:01:04 -0600 Subject: [PATCH 03/10] Add TODO --- .../src/prebuffered/api_version.rs.TODO | 1 + 1 file changed, 1 insertion(+) create mode 100644 experiments/simd-r-drive-muxio-service-definition/src/prebuffered/api_version.rs.TODO diff --git a/experiments/simd-r-drive-muxio-service-definition/src/prebuffered/api_version.rs.TODO b/experiments/simd-r-drive-muxio-service-definition/src/prebuffered/api_version.rs.TODO new file mode 100644 index 00000000..9b906735 --- /dev/null +++ b/experiments/simd-r-drive-muxio-service-definition/src/prebuffered/api_version.rs.TODO @@ -0,0 +1 @@ +// TODO: Add `api_version` route From 843c3a6d8624c92daa9b82d2d5c25cd390e850e1 Mon Sep 17 00:00:00 2001 From: Jeremy Harris Date: Fri, 27 Jun 2025 12:02:48 -0600 Subject: [PATCH 04/10] Bump `Muxio` --- .../simd-r-drive-muxio-service-definition/Cargo.toml | 2 +- experiments/simd-r-drive-ws-client/Cargo.toml | 6 +++--- experiments/simd-r-drive-ws-server/Cargo.toml | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/experiments/simd-r-drive-muxio-service-definition/Cargo.toml b/experiments/simd-r-drive-muxio-service-definition/Cargo.toml index 52b7e3ea..b80017ff 100644 --- a/experiments/simd-r-drive-muxio-service-definition/Cargo.toml +++ b/experiments/simd-r-drive-muxio-service-definition/Cargo.toml @@ -12,5 +12,5 @@ publish.workspace = true # Inherit from workspace [dependencies] bitcode = "0.6.6" -muxio-rpc-service = "0.8.0-alpha" +muxio-rpc-service = "0.9.0-alpha" diff --git a/experiments/simd-r-drive-ws-client/Cargo.toml b/experiments/simd-r-drive-ws-client/Cargo.toml index e52ee942..ef7cc618 100644 --- a/experiments/simd-r-drive-ws-client/Cargo.toml +++ b/experiments/simd-r-drive-ws-client/Cargo.toml @@ -13,9 +13,9 @@ publish.workspace = true # Inherit from workspace [dependencies] simd-r-drive = { workspace = true } simd-r-drive-muxio-service-definition = { workspace = true } -muxio-tokio-rpc-client = "0.8.0-alpha" -muxio-rpc-service = "0.8.0-alpha" -muxio-rpc-service-caller = "0.8.0-alpha" +muxio-tokio-rpc-client = "0.9.0-alpha" +muxio-rpc-service = "0.9.0-alpha" +muxio-rpc-service-caller = "0.9.0-alpha" tokio = "1.45.1" tracing = "0.1.41" async-trait = "0.1.88" diff --git a/experiments/simd-r-drive-ws-server/Cargo.toml b/experiments/simd-r-drive-ws-server/Cargo.toml index 4b304c41..51f6020c 100644 --- a/experiments/simd-r-drive-ws-server/Cargo.toml +++ b/experiments/simd-r-drive-ws-server/Cargo.toml @@ -13,8 +13,8 @@ publish.workspace = true # Inherit from workspace [dependencies] simd-r-drive = { workspace = true } simd-r-drive-muxio-service-definition = { workspace = true } -muxio-tokio-rpc-server = "0.8.0-alpha" -muxio-rpc-service = "0.8.0-alpha" +muxio-tokio-rpc-server = "0.9.0-alpha" +muxio-rpc-service = "0.9.0-alpha" tokio = "1.45.1" tracing-subscriber = { version = "0.3.19", features = ["env-filter"] } tracing = "0.1.41" From 69da2e9e87ec3c7bebcff34db34f9d78e3f48f66 Mon Sep 17 00:00:00 2001 From: Jeremy Harris Date: Fri, 27 Jun 2025 14:01:51 -0600 Subject: [PATCH 05/10] Add `host/port` args to server --- Cargo.lock | 24 +++++-------------- .../src/cli/cli_parser.rs | 20 +++++++++++----- .../src/cli/help_template.rs | 11 +++++---- .../simd-r-drive-ws-server/src/main.rs | 9 ++----- 4 files changed, 29 insertions(+), 35 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0f64f4a8..3912ab1a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -959,9 +959,7 @@ dependencies = [ [[package]] name = "muxio" -version = "0.8.0-alpha" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "438fae9dabf5fced61fc02c8220dfd3d32f4c3fe920fb86a2948633a0bbaeb1c" +version = "0.9.0-alpha" dependencies = [ "chrono", "once_cell", @@ -970,9 +968,7 @@ dependencies = [ [[package]] name = "muxio-rpc-service" -version = "0.8.0-alpha" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aaaaa655085a8524e405ace03657c518f7ed39ae4af40a5424f466b9180ca9e5" +version = "0.9.0-alpha" dependencies = [ "async-trait", "futures", @@ -983,9 +979,7 @@ dependencies = [ [[package]] name = "muxio-rpc-service-caller" -version = "0.8.0-alpha" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "061ca0a702e645d7d48867c36ed64b7e98eb1398a3c7fb2eef1dc63a990ec309" +version = "0.9.0-alpha" dependencies = [ "async-trait", "futures", @@ -996,9 +990,7 @@ dependencies = [ [[package]] name = "muxio-rpc-service-endpoint" -version = "0.8.0-alpha" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a531065063b4568f4c4bba14f461f58dde86a89c44f3f1d2b4e155614602f6b3" +version = "0.9.0-alpha" dependencies = [ "async-trait", "futures", @@ -1011,9 +1003,7 @@ dependencies = [ [[package]] name = "muxio-tokio-rpc-client" -version = "0.8.0-alpha" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0718e9399969c331e8f4ef2e8db9778b319f47cee541517b0192216a273554ea" +version = "0.9.0-alpha" dependencies = [ "async-trait", "bytes", @@ -1029,9 +1019,7 @@ dependencies = [ [[package]] name = "muxio-tokio-rpc-server" -version = "0.8.0-alpha" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3bf8cd76c1daac24a233e5bf5c3d55e4dcbf5cdaa8c7df37f6bf02381a37f7b0" +version = "0.9.0-alpha" dependencies = [ "async-trait", "axum", diff --git a/experiments/simd-r-drive-ws-server/src/cli/cli_parser.rs b/experiments/simd-r-drive-ws-server/src/cli/cli_parser.rs index 4dd15076..436dc42c 100644 --- a/experiments/simd-r-drive-ws-server/src/cli/cli_parser.rs +++ b/experiments/simd-r-drive-ws-server/src/cli/cli_parser.rs @@ -2,7 +2,6 @@ use crate::cli::HELP_TEMPLATE; use clap::CommandFactory; use clap::Parser; use clap::error::ErrorKind; -use std::net::SocketAddr; use std::path::PathBuf; /// CLI for starting the SIMD R Drive RPC server @@ -22,14 +21,23 @@ pub struct Cli { )] pub storage: PathBuf, - /// Address to bind the RPC server to. Defaults to 127.0.0.1 with a random port. + /// The host address to bind the RPC server to. #[arg( long, - value_name = "ADDR", - default_value = "127.0.0.1:0", - help = "Socket address to listen on, e.g. 127.0.0.1:7000" + value_name = "HOST", + default_value = "127.0.0.1", + help = "Host address to listen on (e.g., 127.0.0.1, 0.0.0.0, localhost)" )] - pub listen: SocketAddr, + pub host: String, + + /// The port to bind the RPC server to. + #[arg( + long, + value_name = "PORT", + default_value_t = 0, + help = "Port to listen on [default: a random free port]" + )] + pub port: u16, } impl Cli { diff --git a/experiments/simd-r-drive-ws-server/src/cli/help_template.rs b/experiments/simd-r-drive-ws-server/src/cli/help_template.rs index 668f58f2..c5fce055 100644 --- a/experiments/simd-r-drive-ws-server/src/cli/help_template.rs +++ b/experiments/simd-r-drive-ws-server/src/cli/help_template.rs @@ -1,11 +1,14 @@ use indoc::indoc; -// Help text template with placeholder +// Help text template with placeholder for the binary name. pub const HELP_TEMPLATE: &str = indoc! {r#" Examples: - # Listen on a random internal port + # Start server with a storage file, listening on a random port on 127.0.0.1 %BINARY_NAME% data.bin - # Listen on a pre-specified socket address - %BINARY_NAME% data.bin --listen 127.0.0.1:7000 + # Listen on a specific host and port + %BINARY_NAME% data.bin --host 0.0.0.0 --port 7000 + + # Listen on a specific port on the default host (127.0.0.1) + %BINARY_NAME% data.bin --port 7000 "#}; diff --git a/experiments/simd-r-drive-ws-server/src/main.rs b/experiments/simd-r-drive-ws-server/src/main.rs index 3e569e3c..63aecdf8 100644 --- a/experiments/simd-r-drive-ws-server/src/main.rs +++ b/experiments/simd-r-drive-ws-server/src/main.rs @@ -1,6 +1,5 @@ use std::sync::Arc; use tokio::join; -use tokio::net::TcpListener; use tokio::sync::RwLock; use tokio::task; use tracing::info; @@ -26,8 +25,6 @@ async fn main() -> std::io::Result<()> { tracing_subscriber::fmt().with_env_filter("info").init(); let store_path = args.storage; - let listener = TcpListener::bind(args.listen).await?; - let addr = listener.local_addr()?; // Wrap the DataStore in a tokio::RwLock to support: // - multiple concurrent readers @@ -178,10 +175,8 @@ async fn main() -> std::io::Result<()> { }), ); - info!(address = %addr, "MAIN: RPC Server listening."); - - Arc::new(rpc_server) - .serve_with_listener(listener) + rpc_server + .serve_on(&args.host, args.port) .await .map_err(std::io::Error::other)?; From 180e204e2c29baf556318ed79948a6c2b90aeddb Mon Sep 17 00:00:00 2001 From: Jeremy Harris Date: Fri, 27 Jun 2025 19:29:05 -0600 Subject: [PATCH 06/10] Hide default port arg --- experiments/simd-r-drive-ws-server/src/cli/cli_parser.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/experiments/simd-r-drive-ws-server/src/cli/cli_parser.rs b/experiments/simd-r-drive-ws-server/src/cli/cli_parser.rs index 436dc42c..bcc8f475 100644 --- a/experiments/simd-r-drive-ws-server/src/cli/cli_parser.rs +++ b/experiments/simd-r-drive-ws-server/src/cli/cli_parser.rs @@ -35,6 +35,7 @@ pub struct Cli { long, value_name = "PORT", default_value_t = 0, + hide_default_value = true, // Override `clap` default with a custom one help = "Port to listen on [default: a random free port]" )] pub port: u16, From a35c573f8c23ce1f4c1b13c9d6081c65fcd8b178 Mon Sep 17 00:00:00 2001 From: Jeremy Harris Date: Fri, 27 Jun 2025 19:31:21 -0600 Subject: [PATCH 07/10] Update client args --- experiments/simd-r-drive-ws-client/src/ws_client.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/experiments/simd-r-drive-ws-client/src/ws_client.rs b/experiments/simd-r-drive-ws-client/src/ws_client.rs index 349dae44..d4ab45ec 100644 --- a/experiments/simd-r-drive-ws-client/src/ws_client.rs +++ b/experiments/simd-r-drive-ws-client/src/ws_client.rs @@ -15,8 +15,8 @@ pub struct WsClient { } impl WsClient { - pub async fn new(websocket_address: &str) -> Result { - let rpc_client = RpcClient::new(&format!("ws://{}/ws", websocket_address)).await?; + pub async fn new(host: &str, port: u16) -> Result { + let rpc_client = RpcClient::new(host, port).await?; Ok(Self { rpc_client }) } From fd8dbb3297d1458a8b05aed0703bd63c25c960e8 Mon Sep 17 00:00:00 2001 From: Jeremy Harris Date: Fri, 27 Jun 2025 20:14:49 -0600 Subject: [PATCH 08/10] Update Python client args --- experiments/bindings/python-ws-client/Cargo.lock | 10 +++++----- .../bindings/python-ws-client/integration_test.sh | 8 +++++--- .../simd_r_drive_ws_client.pyi | 5 +++-- .../python-ws-client/src/base_ws_client_py.rs | 4 ++-- .../tests/integraton/test_client.py | 13 +++++++------ .../integraton/test_multithreaded_read_write.py | 9 +++++---- experiments/bindings/python-ws-client/uv.lock | 2 +- 7 files changed, 28 insertions(+), 23 deletions(-) diff --git a/experiments/bindings/python-ws-client/Cargo.lock b/experiments/bindings/python-ws-client/Cargo.lock index 5da330ef..eb654aee 100644 --- a/experiments/bindings/python-ws-client/Cargo.lock +++ b/experiments/bindings/python-ws-client/Cargo.lock @@ -646,7 +646,7 @@ dependencies = [ [[package]] name = "muxio" -version = "0.8.0-alpha" +version = "0.9.0-alpha" dependencies = [ "chrono", "once_cell", @@ -655,7 +655,7 @@ dependencies = [ [[package]] name = "muxio-rpc-service" -version = "0.8.0-alpha" +version = "0.9.0-alpha" dependencies = [ "async-trait", "futures", @@ -666,7 +666,7 @@ dependencies = [ [[package]] name = "muxio-rpc-service-caller" -version = "0.8.0-alpha" +version = "0.9.0-alpha" dependencies = [ "async-trait", "futures", @@ -677,7 +677,7 @@ dependencies = [ [[package]] name = "muxio-tokio-rpc-client" -version = "0.8.0-alpha" +version = "0.9.0-alpha" dependencies = [ "async-trait", "bytes", @@ -1657,4 +1657,4 @@ dependencies = [ [[patch.unused]] name = "muxio-tokio-rpc-server" -version = "0.8.0-alpha" +version = "0.9.0-alpha" diff --git a/experiments/bindings/python-ws-client/integration_test.sh b/experiments/bindings/python-ws-client/integration_test.sh index b6a3b71e..d5777d59 100755 --- a/experiments/bindings/python-ws-client/integration_test.sh +++ b/experiments/bindings/python-ws-client/integration_test.sh @@ -10,7 +10,8 @@ EXPERIMENTS_DIR_REL_PATH="../../" # Server and test settings SERVER_PACKAGE_NAME="simd-r-drive-ws-server" STORAGE_FILE="/tmp/simd-r-drive-pytest-storage.bin" -SERVER_ADDR="127.0.0.1:34129" +SERVER_HOST="127.0.0.1" +SERVER_PORT=34129 SERVER_PID="" # --- Cleanup Function --- @@ -49,7 +50,7 @@ echo "--> Starting server in background mode..." set -m # Use 'cargo run' to start the server, which is more reliable than a direct path. # The '--' separates cargo's arguments from the application's arguments. -cargo run --package "$SERVER_PACKAGE_NAME" -- "$STORAGE_FILE" --listen "$SERVER_ADDR" & +cargo run --package "$SERVER_PACKAGE_NAME" -- "$STORAGE_FILE" --host "$SERVER_HOST" --port "$SERVER_PORT" & SERVER_PID=$! set +m echo "Server process started with PID: $SERVER_PID." @@ -79,7 +80,8 @@ pwd echo "--> Running pytest..." # Export the server address so the Python test script can use it -export TEST_SERVER_ADDR=$SERVER_ADDR +export TEST_SERVER_HOST=$SERVER_HOST +export TEST_SERVER_PORT=$SERVER_PORT # Run pytest using the virtual environment's executable uv run pytest -v -s diff --git a/experiments/bindings/python-ws-client/simd_r_drive_ws_client/simd_r_drive_ws_client.pyi b/experiments/bindings/python-ws-client/simd_r_drive_ws_client/simd_r_drive_ws_client.pyi index 941f2324..00dc4da0 100644 --- a/experiments/bindings/python-ws-client/simd_r_drive_ws_client/simd_r_drive_ws_client.pyi +++ b/experiments/bindings/python-ws-client/simd_r_drive_ws_client/simd_r_drive_ws_client.pyi @@ -12,12 +12,13 @@ class DataStoreWsClient: key/value pairs, streaming writes, and zero-copy reads. """ - def __init__(self, ws_addr: str) -> None: + def __init__(self, host: str, port: int) -> None: """ Connects to a SIMD R Drive server. Args: - ws_addr (str): The WebSocket address of the SIMD R Drive server. + host (str): The hostname or IP address of the server to connect to. + port (int): The TCP port of the server. """ ... diff --git a/experiments/bindings/python-ws-client/src/base_ws_client_py.rs b/experiments/bindings/python-ws-client/src/base_ws_client_py.rs index 43b6a0a5..bf69db6a 100644 --- a/experiments/bindings/python-ws-client/src/base_ws_client_py.rs +++ b/experiments/bindings/python-ws-client/src/base_ws_client_py.rs @@ -26,7 +26,7 @@ pub struct BaseDataStoreWsClient { #[pymethods] impl BaseDataStoreWsClient { #[new] - fn new(_py: Python<'_>, ws_address: &str) -> PyResult { + fn new(_py: Python<'_>, host: &str, port: u16) -> PyResult { let runtime = Arc::new( Builder::new_multi_thread() .enable_all() @@ -37,7 +37,7 @@ impl BaseDataStoreWsClient { ); let ws_client = runtime - .block_on(async { WsClient::new(ws_address).await }) + .block_on(async { WsClient::new(host, port).await }) .map_err(|e| PyIOError::new_err(e.to_string()))?; let is_connected_clone = Arc::new(AtomicBool::new(true)); diff --git a/experiments/bindings/python-ws-client/tests/integraton/test_client.py b/experiments/bindings/python-ws-client/tests/integraton/test_client.py index e717cc63..2345d8f7 100644 --- a/experiments/bindings/python-ws-client/tests/integraton/test_client.py +++ b/experiments/bindings/python-ws-client/tests/integraton/test_client.py @@ -5,7 +5,8 @@ import secrets # Server address, configurable via environment variable -SERVER_ADDR = os.environ.get("TEST_SERVER_ADDR", "127.0.0.1:34129") +SERVER_HOST = os.environ.get("TEST_SERVER_HOST", "127.0.0.1") +SERVER_PORT = int(os.environ.get("TEST_SERVER_PORT", 34129)) @pytest.fixture(scope="module") @@ -17,11 +18,11 @@ def client(): # Allow some time for the server to start up. time.sleep(2) try: - ws_client = DataStoreWsClient(SERVER_ADDR) + ws_client = DataStoreWsClient(SERVER_HOST, SERVER_PORT) yield ws_client except Exception as e: pytest.fail( - f"Failed to connect to the WebSocket server at {SERVER_ADDR}. Is it running? Error: {e}" + f"Failed to connect to the WebSocket server at {SERVER_HOST}. Is it running? Error: {e}" ) @@ -123,9 +124,9 @@ def test_large_batch_write(client): def test_batch_read_with_missing_key(client): """ Verifies that batch_read: - – returns payloads for existing keys, - – returns None for keys that are absent, - – preserves order (results[i] matches keys[i]). + - returns payloads for existing keys, + - returns None for keys that are absent, + - preserves order (results[i] matches keys[i]). """ # --- Arrange ---------------------------------------------------------- entries = [ diff --git a/experiments/bindings/python-ws-client/tests/integraton/test_multithreaded_read_write.py b/experiments/bindings/python-ws-client/tests/integraton/test_multithreaded_read_write.py index 1e093bde..ffa9ddd8 100644 --- a/experiments/bindings/python-ws-client/tests/integraton/test_multithreaded_read_write.py +++ b/experiments/bindings/python-ws-client/tests/integraton/test_multithreaded_read_write.py @@ -7,7 +7,8 @@ import secrets # Server address, configurable via environment variable -SERVER_ADDR = os.environ.get("TEST_SERVER_ADDR", "127.0.0.1:34129") +SERVER_HOST = os.environ.get("TEST_SERVER_HOST", "127.0.0.1") +SERVER_PORT = int(os.environ.get("TEST_SERVER_PORT", 34129)) @pytest.fixture(scope="module") @@ -19,11 +20,11 @@ def client(): # Allow some time for the server to start up. time.sleep(2) try: - ws_client = DataStoreWsClient(SERVER_ADDR) + ws_client = DataStoreWsClient(SERVER_HOST, SERVER_PORT) yield ws_client except Exception as e: pytest.fail( - f"Failed to connect to the WebSocket server at {SERVER_ADDR}. Is it running? Error: {e}" + f"Failed to connect to the WebSocket server at {SERVER_HOST}. Is it running? Error: {e}" ) def test_concurrent_read_write_stress(client): @@ -47,7 +48,7 @@ def worker(thread_id): # Each worker creates its own client connection to simulate concurrent users. local_client = None try: - local_client = DataStoreWsClient(SERVER_ADDR) + local_client = DataStoreWsClient(SERVER_HOST, SERVER_PORT) for i in range(OPERATIONS_PER_THREAD): # Randomly choose between writing and reading if ( diff --git a/experiments/bindings/python-ws-client/uv.lock b/experiments/bindings/python-ws-client/uv.lock index 467bc140..2b040513 100644 --- a/experiments/bindings/python-ws-client/uv.lock +++ b/experiments/bindings/python-ws-client/uv.lock @@ -284,7 +284,7 @@ wheels = [ [[package]] name = "simd-r-drive-ws-client" -version = "0.7.0a0" +version = "0.8.0a0" source = { editable = "." } [package.dev-dependencies] From 5ec2bbdf9fc1f1c527b08c7203aedd91f2b55d9f Mon Sep 17 00:00:00 2001 From: Jeremy Harris Date: Fri, 27 Jun 2025 20:37:41 -0600 Subject: [PATCH 09/10] Fix Clippy warnings --- extensions/tests/storage_file_import_tests.rs | 12 +- extensions/tests/storage_option_tests.rs | 6 +- src/cli/execute_command.rs | 30 ++--- src/storage_engine/data_store.rs | 6 +- src/utils/format_bytes.rs | 2 +- src/utils/parse_buffer_size.rs | 4 +- tests/basic_operations_tests.rs | 2 +- tests/batch_ops_tests.rs | 3 +- tests/cli_tests.rs | 119 +++++------------- tests/compaction_tests.rs | 4 +- tests/concurrency_tests.rs | 27 ++-- tests/persistence_tests.rs | 6 +- 12 files changed, 77 insertions(+), 144 deletions(-) diff --git a/extensions/tests/storage_file_import_tests.rs b/extensions/tests/storage_file_import_tests.rs index 246e5432..cf296068 100644 --- a/extensions/tests/storage_file_import_tests.rs +++ b/extensions/tests/storage_file_import_tests.rs @@ -22,8 +22,7 @@ fn test_import_directory_and_verify_contents() { assert!( source_dir.exists(), - "Test source directory does not exist: {:?}", - source_dir + "Test source directory does not exist: {source_dir:?}", ); let (_dir, storage) = create_temp_storage(); @@ -44,8 +43,7 @@ fn test_import_directory_and_verify_contents() { assert!( original_path.exists(), - "Original file missing for key: {:?}", - original_path + "Original file missing for key: {original_path:?}", ); let mut expected = Vec::new(); @@ -57,8 +55,7 @@ fn test_import_directory_and_verify_contents() { assert_eq!( actual.as_slice(), expected.as_slice(), - "Mismatch in stored content for key {:?}", - key_str + "Mismatch in stored content for key {key_str:?}", ); } } @@ -71,8 +68,7 @@ fn test_import_without_namespace() { assert!( source_dir.exists(), - "Expected test source directory to exist: {:?}", - source_dir + "Expected test source directory to exist: {source_dir:?}", ); let (_dir, storage) = create_temp_storage(); diff --git a/extensions/tests/storage_option_tests.rs b/extensions/tests/storage_option_tests.rs index 88f6c5b7..94bba381 100644 --- a/extensions/tests/storage_option_tests.rs +++ b/extensions/tests/storage_option_tests.rs @@ -176,8 +176,7 @@ mod tests { assert!( matches!(retrieved, Err(ref e) if e.kind() == ErrorKind::NotFound), - "Expected `ErrorKind::NotFound` when reading a non-existent key, got: {:?}", - retrieved + "Expected `ErrorKind::NotFound` when reading a non-existent key, got: {retrieved:?}", ); } @@ -216,8 +215,7 @@ mod tests { assert_eq!( &retrieved, expected, - "Mismatch between written and retrieved data for key {:?}", - key + "Mismatch between written and retrieved data for key {key:?}", ); } } diff --git a/src/cli/execute_command.rs b/src/cli/execute_command.rs index c779cf6b..c8617abd 100644 --- a/src/cli/execute_command.rs +++ b/src/cli/execute_command.rs @@ -33,7 +33,7 @@ pub fn execute_command(cli: &Cli) { .map(parse_buffer_size) .transpose() .unwrap_or_else(|err| { - eprintln!("{}", err); + eprintln!("{err}"); std::process::exit(1); }) .unwrap_or(64 * 1024); // Default to 64KB @@ -74,11 +74,11 @@ pub fn execute_command(cli: &Cli) { } } Ok(None) => { - eprintln!("Error: Key '{}' not found", key); + eprintln!("Error: Key '{key}' not found"); std::process::exit(1); } Err(e) => { - eprintln!("Error: {:?}", e); + eprintln!("Error: {e:?}"); std::process::exit(1); } } @@ -98,7 +98,7 @@ pub fn execute_command(cli: &Cli) { let mut stdin_reader = io::stdin().lock(); if let Err(err) = storage.write_stream(key_as_bytes, &mut stdin_reader) { - eprintln!("Failed to write streamed stdin data: {}", err); + eprintln!("Failed to write streamed stdin data: {err}"); std::process::exit(1); } } else { @@ -107,7 +107,7 @@ pub fn execute_command(cli: &Cli) { std::process::exit(1); } - println!("Stored '{}'", key); + println!("Stored '{key}'"); } Commands::Copy { key, target } => { @@ -119,12 +119,12 @@ pub fn execute_command(cli: &Cli) { source_storage .copy_entry(key.as_bytes(), &target_storage) .map_err(|err| { - eprintln!("Could not copy entry. Received error: {}", err); + eprintln!("Could not copy entry. Received error: {err}"); std::process::exit(1); }) .ok(); // Ignore the success case - println!("Copied key '{}' to {:?}", key, target); + println!("Copied key '{key}' to {target:?}"); } Commands::Move { key, target } => { @@ -136,12 +136,12 @@ pub fn execute_command(cli: &Cli) { source_storage .move_entry(key.as_bytes(), &target_storage) .map_err(|err| { - eprintln!("Could not copy entry. Received error: {}", err); + eprintln!("Could not copy entry. Received error: {err}"); std::process::exit(1); }) .ok(); // Ignore the success case - println!("Moved key '{}' to {:?}", key, target); + println!("Moved key '{key}' to {target:?}"); } Commands::Rename { old_key, new_key } => { @@ -151,12 +151,12 @@ pub fn execute_command(cli: &Cli) { storage .rename_entry(old_key.as_bytes(), new_key.as_bytes()) .map_err(|err| { - eprintln!("Could not rename entry. Received error: {}", err); + eprintln!("Could not rename entry. Received error: {err}"); std::process::exit(1); }) .ok(); // Ignore the success case - println!("Renamed key '{}' to {}", old_key, new_key); + println!("Renamed key '{old_key}' to {new_key}"); } Commands::Delete { key } => { @@ -165,7 +165,7 @@ pub fn execute_command(cli: &Cli) { storage .delete_entry(key.as_bytes()) .expect("Failed to delete entry"); - eprintln!("Deleted key '{}'", key); + eprintln!("Deleted key '{key}'"); } Commands::Compact => { @@ -173,7 +173,7 @@ pub fn execute_command(cli: &Cli) { DataStore::open_existing(&cli.storage).expect("Failed to open storage"); println!("Starting compaction..."); if let Err(e) = storage.compact() { - eprintln!("Compaction failed: {}", e); + eprintln!("Compaction failed: {e}"); std::process::exit(1); } println!("Compaction completed successfully."); @@ -214,11 +214,11 @@ pub fn execute_command(cli: &Cli) { println!("{:=<50}", ""); // Footer Line } Ok(None) => { - eprintln!("Error: Key '{}' not found", key); + eprintln!("Error: Key '{key}' not found"); std::process::exit(1); } Err(e) => { - eprintln!("Error: {:?}", e); + eprintln!("Error: {e:?}"); std::process::exit(1); } } diff --git a/src/storage_engine/data_store.rs b/src/storage_engine/data_store.rs index 1b97be08..78d599d8 100644 --- a/src/storage_engine/data_store.rs +++ b/src/storage_engine/data_store.rs @@ -547,6 +547,7 @@ impl DataStore { target.write_stream_with_key_hash(entry.key_hash(), &mut entry_stream) } + // TODO: Determine thread count *before* running this OR [somehow] make it thread safe. /// Compacts the storage by keeping only the latest version of each key. /// /// # ⚠️ WARNING: @@ -596,12 +597,11 @@ impl DataStore { let mut file_guard = compacted_storage .file .write() - .map_err(|e| std::io::Error::other(format!("Lock poisoned: {}", e)))?; + .map_err(|e| std::io::Error::other(format!("Lock poisoned: {e}")))?; file_guard.flush()?; } else { info!( - "Compaction would increase file size (data w/ indexing: {}). Skipping static index generation.", - compacted_data_size + "Compaction would increase file size (data w/ indexing: {compacted_data_size}). Skipping static index generation.", ); } diff --git a/src/utils/format_bytes.rs b/src/utils/format_bytes.rs index 8b0c3a96..e67f5e9c 100644 --- a/src/utils/format_bytes.rs +++ b/src/utils/format_bytes.rs @@ -25,6 +25,6 @@ pub fn format_bytes(bytes: u64) -> String { b if b >= GB => format!("{:.2} GB", b as f64 / GB as f64), b if b >= MB => format!("{:.2} MB", b as f64 / MB as f64), b if b >= KB => format!("{:.2} KB", b as f64 / KB as f64), - _ => format!("{} bytes", bytes), + _ => format!("{bytes} bytes"), } } diff --git a/src/utils/parse_buffer_size.rs b/src/utils/parse_buffer_size.rs index 4e6bb619..1d712dd1 100644 --- a/src/utils/parse_buffer_size.rs +++ b/src/utils/parse_buffer_size.rs @@ -47,11 +47,11 @@ pub fn parse_buffer_size(size_str: &str) -> Result { "k" | "kb" => 1024, "m" | "mb" => 1024 * 1024, "g" | "gb" => 1024 * 1024 * 1024, - _ => return Err(format!("Invalid buffer size unit: {}", unit_part)), + _ => return Err(format!("Invalid buffer size unit: {unit_part}")), }; num_part .parse::() .map(|n| n * multiplier) - .map_err(|_| format!("Failed to parse buffer size: {}", size_str)) + .map_err(|_| format!("Failed to parse buffer size: {size_str}")) } diff --git a/tests/basic_operations_tests.rs b/tests/basic_operations_tests.rs index 9de91869..e2bc271c 100644 --- a/tests/basic_operations_tests.rs +++ b/tests/basic_operations_tests.rs @@ -69,7 +69,7 @@ mod tests { for (i, payload) in payloads.iter().enumerate() { storage - .write(format!("key{}", i).as_bytes(), payload.as_slice()) + .write(format!("key{i}").as_bytes(), payload.as_slice()) .expect("Failed to append entry"); } diff --git a/tests/batch_ops_tests.rs b/tests/batch_ops_tests.rs index e847988e..62e81649 100644 --- a/tests/batch_ops_tests.rs +++ b/tests/batch_ops_tests.rs @@ -66,8 +66,7 @@ fn test_batch_write_and_batch_read() { assert_eq!( got.as_slice(), *expected_val, - "payload mismatch for key {:?}", - expected_key + "payload mismatch for key {expected_key:?}", ); } } diff --git a/tests/cli_tests.rs b/tests/cli_tests.rs index 8789202e..20d249c9 100644 --- a/tests/cli_tests.rs +++ b/tests/cli_tests.rs @@ -25,11 +25,7 @@ fn test_write_and_read() { .output() .expect("Failed to execute process"); - assert!( - output.status.success(), - "Write command failed: {:?}", - output - ); + assert!(output.status.success(), "Write command failed: {output:?}",); // Read the value back let output = Command::new("cargo") @@ -38,12 +34,7 @@ fn test_write_and_read() { .expect("Failed to execute process"); let stdout = String::from_utf8_lossy(&output.stdout); - assert_eq!( - stdout.trim(), - "hello", - "Unexpected read output: {:?}", - stdout - ); + assert_eq!(stdout.trim(), "hello", "Unexpected read output: {stdout:?}",); // Cleanup fs::remove_file(TEST_STORAGE).ok(); @@ -69,8 +60,7 @@ fn test_write_without_value() { let stderr = String::from_utf8_lossy(&output.stderr); assert!( stderr.contains("No value provided"), - "Unexpected error message: {:?}", - stderr + "Unexpected error message: {stderr:?}", ); fs::remove_file(TEST_STORAGE).ok(); // Cleanup @@ -110,8 +100,7 @@ fn test_read_nonexistent_key() { assert!( stderr.trim().contains("Key 'nonexistent_key' not found") || stderr.trim().contains("Failed to open storage"), - "Unexpected error output: {:?}", - stderr + "Unexpected error output: {stderr:?}", ); fs::remove_file(TEST_STORAGE).ok(); @@ -142,11 +131,7 @@ fn test_read_with_buffer_size() { .wait_with_output() .expect("Failed to wait on child process"); - assert!( - output.status.success(), - "Write command failed: {:?}", - output - ); + assert!(output.status.success(), "Write command failed: {output:?}",); // Read the value back with a 64KB buffer size let output = Command::new("cargo") @@ -163,7 +148,7 @@ fn test_read_with_buffer_size() { .output() .expect("Failed to execute process"); - assert!(output.status.success(), "Read command failed: {:?}", output); + assert!(output.status.success(), "Read command failed: {output:?}",); let stdout = output.stdout; assert_eq!( @@ -200,11 +185,7 @@ fn test_copy_key() { ]) .output() .expect("Failed to execute process"); - assert!( - output.status.success(), - "Write command failed: {:?}", - output - ); + assert!(output.status.success(), "Write command failed: {output:?}",); // Copy the key to target storage let output = Command::new("cargo") @@ -219,7 +200,7 @@ fn test_copy_key() { ]) .output() .expect("Failed to execute process"); - assert!(output.status.success(), "Copy command failed: {:?}", output); + assert!(output.status.success(), "Copy command failed: {output:?}",); // Read from target storage let output = Command::new("cargo") @@ -230,8 +211,7 @@ fn test_copy_key() { assert_eq!( stdout.trim(), "copy_test", - "Unexpected read output: {:?}", - stdout + "Unexpected read output: {stdout:?}", ); fs::remove_file(TEST_STORAGE).ok(); @@ -256,11 +236,7 @@ fn test_rename_key() { ]) .output() .expect("Failed to execute process"); - assert!( - output.status.success(), - "Write command failed: {:?}", - output - ); + assert!(output.status.success(), "Write command failed: {output:?}",); // Rename the key let output = Command::new("cargo") @@ -275,11 +251,7 @@ fn test_rename_key() { ]) .output() .expect("Failed to execute process"); - assert!( - output.status.success(), - "Rename command failed: {:?}", - output - ); + assert!(output.status.success(), "Rename command failed: {output:?}",); // Ensure old key doesn't exist let output = Command::new("cargo") @@ -297,8 +269,7 @@ fn test_rename_key() { assert_eq!( stdout.trim(), "rename_test", - "Unexpected read output: {:?}", - stdout + "Unexpected read output: {stdout:?}", ); fs::remove_file(TEST_STORAGE).ok(); @@ -322,22 +293,14 @@ fn test_delete_key() { ]) .output() .expect("Failed to execute process"); - assert!( - output.status.success(), - "Write command failed: {:?}", - output - ); + assert!(output.status.success(), "Write command failed: {output:?}",); // Delete the key let output = Command::new("cargo") .args(["run", "--quiet", "--", TEST_STORAGE, "delete", "delete_key"]) .output() .expect("Failed to execute process"); - assert!( - output.status.success(), - "Delete command failed: {:?}", - output - ); + assert!(output.status.success(), "Delete command failed: {output:?}",); // Ensure key doesn't exist let output = Command::new("cargo") @@ -368,11 +331,7 @@ fn test_metadata() { .output() .expect("Failed to execute process"); - assert!( - output.status.success(), - "Write command failed: {:?}", - output - ); + assert!(output.status.success(), "Write command failed: {output:?}",); // Retrieve metadata for the key let output = Command::new("cargo") @@ -383,58 +342,47 @@ fn test_metadata() { let stdout = String::from_utf8_lossy(&output.stdout); assert!( stdout.contains("METADATA SUMMARY"), - "Metadata output invalid: {:?}", - stdout + "Metadata output invalid: {stdout:?}", ); assert!( stdout.contains("ENTRY FOR:"), - "Metadata missing ENTRY FOR: {:?}", - stdout + "Metadata missing ENTRY FOR: {stdout:?}", ); assert!( stdout.contains("test_key"), - "Metadata does not contain key: {:?}", - stdout + "Metadata does not contain key: {stdout:?}", ); assert!( stdout.contains("PAYLOAD SIZE:"), - "Metadata missing payload size: {:?}", - stdout + "Metadata missing payload size: {stdout:?}", ); assert!( stdout.contains("TOTAL SIZE (W/ METADATA):"), - "Metadata missing total size: {:?}", - stdout + "Metadata missing total size: {stdout:?}", ); assert!( stdout.contains("OFFSET RANGE:"), - "Metadata missing offset range: {:?}", - stdout + "Metadata missing offset range: {stdout:?}", ); assert!( stdout.contains("MEMORY ADDRESS:"), - "Metadata missing memory address: {:?}", - stdout + "Metadata missing memory address: {stdout:?}", ); assert!( stdout.contains("KEY HASH:"), - "Metadata missing key hash: {:?}", - stdout + "Metadata missing key hash: {stdout:?}", ); assert!( stdout.contains("CHECKSUM:"), - "Metadata missing checksum: {:?}", - stdout + "Metadata missing checksum: {stdout:?}", ); assert!( stdout.contains("CHECKSUM VALIDITY:"), - "Metadata missing checksum validity: {:?}", - stdout + "Metadata missing checksum validity: {stdout:?}", ); assert!( stdout.contains("STORED METADATA:"), - "Metadata missing stored metadata: {:?}", - stdout + "Metadata missing stored metadata: {stdout:?}", ); fs::remove_file(TEST_STORAGE).ok(); // Cleanup @@ -457,28 +405,23 @@ fn test_info() { let stdout = String::from_utf8_lossy(&output.stdout); assert!( stdout.contains("STORAGE INFO"), - "Info output invalid: {:?}", - stdout + "Info output invalid: {stdout:?}", ); assert!( stdout.contains("STORAGE FILE:"), - "Info missing storage file: {:?}", - stdout + "Info missing storage file: {stdout:?}", ); assert!( stdout.contains("TOTAL SIZE:"), - "Info missing total size: {:?}", - stdout + "Info missing total size: {stdout:?}", ); assert!( stdout.contains("ACTIVE ENTRIES:"), - "Info missing active entries: {:?}", - stdout + "Info missing active entries: {stdout:?}", ); assert!( stdout.contains("COMPACTION SAVINGS:"), - "Info missing compaction savings: {:?}", - stdout + "Info missing compaction savings: {stdout:?}", ); fs::remove_file(TEST_STORAGE).ok(); // Cleanup diff --git a/tests/compaction_tests.rs b/tests/compaction_tests.rs index a903d9b7..d97d372d 100644 --- a/tests/compaction_tests.rs +++ b/tests/compaction_tests.rs @@ -131,7 +131,7 @@ mod tests { let size_before = std::fs::metadata(&path) .expect("Failed to get metadata") .len(); - eprintln!("File size before compaction: {}", size_before); + eprintln!("File size before compaction: {size_before}"); // Step 3: Compact Storage eprintln!("Starting compaction..."); @@ -141,7 +141,7 @@ mod tests { let size_after = std::fs::metadata(&path) .expect("Failed to get metadata") .len(); - eprintln!("File size after compaction: {}", size_after); + eprintln!("File size after compaction: {size_after}"); assert!( size_after < size_before, diff --git a/tests/concurrency_tests.rs b/tests/concurrency_tests.rs index 7bedf8f1..804e2ba0 100644 --- a/tests/concurrency_tests.rs +++ b/tests/concurrency_tests.rs @@ -72,8 +72,7 @@ async fn concurrent_slow_streamed_write_test() { .expect("Failed to write stream!"); eprintln!( - "[Task {}] Finished writing stream {:?} ({} bytes written)", - i, key, bytes_written + "[Task {i}] Finished writing stream {key:?} ({bytes_written} bytes written)", ); })); } @@ -95,14 +94,12 @@ async fn concurrent_slow_streamed_write_test() { // really difficult to figure out the error, hence the `all_values_match` assert!( all_values_match, - "Stream {:?} data mismatch: contents do not match", - key + "Stream {key:?} data mismatch: contents do not match", ); assert!( length_match, - "Stream {:?} length mismatch: expected {} but got {}", - key, + "Stream {key:?} length mismatch: expected {} but got {}", expected_data.len(), retrieved.len() ); @@ -127,13 +124,13 @@ async fn concurrent_write_test() { let storage_clone = Arc::clone(&storage); tasks.push(tokio::spawn(async move { for i in 0..num_writes { - let key = format!("thread{}_key{}", thread_id, i).into_bytes(); - let value = format!("thread{}_value{}", thread_id, i).into_bytes(); + let key = format!("thread{thread_id}_key{i}").into_bytes(); + let value = format!("thread{thread_id}_value{i}").into_bytes(); // Directly call the method without attempting to mutate the Arc storage_clone.write(&key, &value).unwrap(); - eprintln!("[Thread {}] Wrote: {:?} -> {:?}", thread_id, key, value); + eprintln!("[Thread {thread_id}] Wrote: {key:?} -> {value:?}"); tokio::time::sleep(Duration::from_millis(5)).await; // Simulate delays } })); @@ -147,8 +144,8 @@ async fn concurrent_write_test() { // Final Check: Ensure all written keys exist for thread_id in 0..thread_count { for i in 0..num_writes { - let key = format!("thread{}_key{}", thread_id, i).into_bytes(); - let value = format!("thread{}_value{}", thread_id, i).into_bytes(); + let key = format!("thread{thread_id}_key{i}").into_bytes(); + let value = format!("thread{thread_id}_value{i}").into_bytes(); let stored_value = storage.read(&key).unwrap(); eprintln!( @@ -183,7 +180,7 @@ async fn interleaved_read_write_test() { // Step 1: Write initial data let value_a1 = b"value_from_A1"; storage_clone_a.write(key, value_a1).unwrap(); - eprintln!("[Thread A] Wrote: {:?}", value_a1); + eprintln!("[Thread A] Wrote: {value_a1:?}"); // Step 2: Notify Thread B that it can read now notify_a_clone.notify_waiters(); @@ -207,13 +204,13 @@ async fn interleaved_read_write_test() { notify_a_clone.notified().await; let result = storage_clone_b.read(key).unwrap(); - eprintln!("[Thread B] Read initial value: {:?}", result); + eprintln!("[Thread B] Read initial value: {result:?}"); assert_eq!(result.as_deref(), Some(b"value_from_A1".as_ref())); // Step 4: Write new data let value_b = b"value_from_B"; storage_clone_b.write(key, value_b).unwrap(); - eprintln!("[Thread B] Wrote: {:?}", value_b); + eprintln!("[Thread B] Wrote: {value_b:?}"); // Step 6: Notify Thread A that it can now read the updated value notify_b_clone.notify_waiters(); @@ -227,6 +224,6 @@ async fn interleaved_read_write_test() { // Final Check: Ensure storage contains the latest value let final_value = storage.read(b"shared_key").unwrap(); - eprintln!("[Main] FINAL VALUE: {:?}", final_value); + eprintln!("[Main] FINAL VALUE: {final_value:?}"); assert_eq!(final_value.as_deref(), Some(b"value_from_B".as_ref())); } diff --git a/tests/persistence_tests.rs b/tests/persistence_tests.rs index c7f154a6..03591c4f 100644 --- a/tests/persistence_tests.rs +++ b/tests/persistence_tests.rs @@ -121,7 +121,7 @@ mod tests { } // Storage goes out of scope here, ensuring file is closed let file_size_before = metadata(&path).expect("Failed to get metadata").len(); - eprintln!("File size before corruption: {}", file_size_before); + eprintln!("File size before corruption: {file_size_before}"); // Step 2: Simulate corruption by writing partial data { @@ -141,7 +141,7 @@ mod tests { } let file_size_after = metadata(&path).expect("Failed to get metadata").len(); - eprintln!("File size after corruption: {}", file_size_after); + eprintln!("File size after corruption: {file_size_after}"); // Skipping the following tests on Windows due to memory-mapped file restrictions. // @@ -165,7 +165,7 @@ mod tests { // Check that the recovered file size matches the original before corruption let file_size_after_recovery = metadata(&path).expect("Failed to get metadata").len(); - eprintln!("File size after recovery: {}", file_size_after_recovery); + eprintln!("File size after recovery: {file_size_after_recovery}"); assert_eq!( file_size_after_recovery, file_size_before, From 7db330a9d146d2792531378a30d3f68242f9b93b Mon Sep 17 00:00:00 2001 From: Jeremy Harris Date: Fri, 27 Jun 2025 21:03:51 -0600 Subject: [PATCH 10/10] Bump to `0.9.0-alpha` --- Cargo.lock | 10 +++++----- Cargo.toml | 8 ++++---- experiments/bindings/python-ws-client/Cargo.lock | 6 +++--- experiments/bindings/python-ws-client/pyproject.toml | 2 +- experiments/bindings/python/pyproject.toml | 2 +- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3912ab1a..e6699b0c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1485,7 +1485,7 @@ dependencies = [ [[package]] name = "simd-r-drive" -version = "0.8.0-alpha" +version = "0.9.0-alpha" dependencies = [ "async-trait", "bincode", @@ -1510,7 +1510,7 @@ dependencies = [ [[package]] name = "simd-r-drive-extensions" -version = "0.8.0-alpha" +version = "0.9.0-alpha" dependencies = [ "bincode", "doc-comment", @@ -1522,7 +1522,7 @@ dependencies = [ [[package]] name = "simd-r-drive-muxio-service-definition" -version = "0.8.0-alpha" +version = "0.9.0-alpha" dependencies = [ "bitcode", "muxio-rpc-service", @@ -1530,7 +1530,7 @@ dependencies = [ [[package]] name = "simd-r-drive-ws-client" -version = "0.8.0-alpha" +version = "0.9.0-alpha" dependencies = [ "async-trait", "muxio-rpc-service", @@ -1544,7 +1544,7 @@ dependencies = [ [[package]] name = "simd-r-drive-ws-server" -version = "0.8.0-alpha" +version = "0.9.0-alpha" dependencies = [ "clap", "indoc", diff --git a/Cargo.toml b/Cargo.toml index d4a03624..bc5177e3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [workspace.package] authors = ["Jeremy Harris "] -version = "0.8.0-alpha" +version = "0.9.0-alpha" edition = "2024" repository = "https://github.com/jzombie/rust-simd-r-drive" license = "Apache-2.0" @@ -22,9 +22,9 @@ publish.workspace = true # Inherit from workspace [workspace.dependencies] # Intra-workspace crates -simd-r-drive = { path = ".", version = "0.8.0-alpha" } -simd-r-drive-ws-client = { path = "./experiments/simd-r-drive-ws-client", version = "0.8.0-alpha" } -simd-r-drive-muxio-service-definition = { path = "./experiments/simd-r-drive-muxio-service-definition", version = "0.8.0-alpha" } +simd-r-drive = { path = ".", version = "0.9.0-alpha" } +simd-r-drive-ws-client = { path = "./experiments/simd-r-drive-ws-client", version = "0.9.0-alpha" } +simd-r-drive-muxio-service-definition = { path = "./experiments/simd-r-drive-muxio-service-definition", version = "0.9.0-alpha" } [dependencies] async-trait = "0.1.88" diff --git a/experiments/bindings/python-ws-client/Cargo.lock b/experiments/bindings/python-ws-client/Cargo.lock index eb654aee..e394a881 100644 --- a/experiments/bindings/python-ws-client/Cargo.lock +++ b/experiments/bindings/python-ws-client/Cargo.lock @@ -1074,7 +1074,7 @@ dependencies = [ [[package]] name = "simd-r-drive" -version = "0.8.0-alpha" +version = "0.9.0-alpha" dependencies = [ "async-trait", "clap", @@ -1089,7 +1089,7 @@ dependencies = [ [[package]] name = "simd-r-drive-muxio-service-definition" -version = "0.8.0-alpha" +version = "0.9.0-alpha" dependencies = [ "bitcode", "muxio-rpc-service", @@ -1097,7 +1097,7 @@ dependencies = [ [[package]] name = "simd-r-drive-ws-client" -version = "0.8.0-alpha" +version = "0.9.0-alpha" dependencies = [ "async-trait", "muxio-rpc-service", diff --git a/experiments/bindings/python-ws-client/pyproject.toml b/experiments/bindings/python-ws-client/pyproject.toml index 5d22966e..21986765 100644 --- a/experiments/bindings/python-ws-client/pyproject.toml +++ b/experiments/bindings/python-ws-client/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "simd-r-drive-ws-client" -version = "0.8.0-alpha" +version = "0.9.0-alpha" description = "SIMD-optimized append-only schema-less storage engine. Key-based binary storage in a single-file storage container." repository = "https://github.com/jzombie/rust-simd-r-drive" license = "Apache-2.0" diff --git a/experiments/bindings/python/pyproject.toml b/experiments/bindings/python/pyproject.toml index a9ce5d91..12558844 100644 --- a/experiments/bindings/python/pyproject.toml +++ b/experiments/bindings/python/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "simd-r-drive-py" -version = "0.8.0-alpha" +version = "0.9.0-alpha" description = "SIMD-optimized append-only schema-less storage engine. Key-based binary storage in a single-file storage container." repository = "https://github.com/jzombie/rust-simd-r-drive" license = "Apache-2.0"