Sixteen tests in Tests (core-and-rest) fail only when the shard is run as one cargo
invocation, and pass when their crate is run alone:
cargo nextest run -p sky-monitor 29 passed
cargo nextest run -p rvlite 71 passed, 2 skipped
versus, in a run of the whole shard's package set:
sky-monitor 9 failed Vector(DatabaseError("Database already open. Cannot acquire lock."))
rvlite 7 failed RvLiteError { message: "Failed to create vector database:
Database error: I/O error: No such file or directory (os error 2)" }
Cause
Both crates depend on ruvector-core with default-features = false and a minimal
feature set:
examples/sky-monitor/Cargo.toml:24 — features = ["simd", "parallel"]
crates/rvlite/Cargo.toml:15 — features = ["memory-only"]
and both pass a placeholder storage_path, with comments saying it is ignored:
examples/sky-monitor/src/indexer.rs:53-55 — "sky-monitor-tracks.mem", commented
"Ignored by the in-memory backend (ruvector-core is built here without the storage
feature); kept for API completeness."
crates/rvlite/src/lib.rs:171 and crates/rvlite/src/sql/executor.rs:135 —
"memory://".
Cargo features are additive and unify per build. ruvector-core's default set includes
storage, and other members of this workspace depend on it with defaults, so in a
single-invocation workspace build ruvector-core/storage is on for everybody.
VectorDB::new then takes the #[cfg(feature = "storage")] path unconditionally
(crates/ruvector-core/src/vector_db.rs:38-73) and opens the placeholder as a real
path. "memory://" is not a directory, hence rvlite's ENOENT;
"sky-monitor-tracks.mem" is a single fixed relative path shared by every test
process, hence sky-monitor's lock contention under a per-test-process runner.
So default-features = false does not do what both call sites assume, and the failure
appears only in the exact configuration CI uses.
Why it is invisible today
Tests (core-and-rest) is cancelled at timeout-minutes: 240 while still compiling,
so none of these results are reachable. #784, #786 and #787 are what let that job get
to the test phase; these sixteen failures are waiting behind them.
Suggested direction
The choice between in-memory and persistent storage is a property of the caller's
request, not of who else is in the build graph, so it probably belongs in DbOptions
rather than in a cargo feature — for example honouring a memory:// path (or an
explicit in-memory option) even when storage is compiled in. memory-only already
exists as a feature name in ruvector-core/Cargo.toml but carries no code, which
suggests that intent was already there.
A narrower stopgap is to give each VectorDB a unique writable path, which fixes
sky-monitor cleanly. It is a poorer fit for rvlite, where "memory://" is library code
and writing files would be a behaviour change rather than a test fix.
Happy to send patches for whichever direction you prefer.
Sixteen tests in
Tests (core-and-rest)fail only when the shard is run as one cargoinvocation, and pass when their crate is run alone:
versus, in a run of the whole shard's package set:
Cause
Both crates depend on
ruvector-corewithdefault-features = falseand a minimalfeature set:
examples/sky-monitor/Cargo.toml:24—features = ["simd", "parallel"]crates/rvlite/Cargo.toml:15—features = ["memory-only"]and both pass a placeholder
storage_path, with comments saying it is ignored:examples/sky-monitor/src/indexer.rs:53-55—"sky-monitor-tracks.mem", commented"Ignored by the in-memory backend (ruvector-core is built here without the
storagefeature); kept for API completeness."
crates/rvlite/src/lib.rs:171andcrates/rvlite/src/sql/executor.rs:135—"memory://".Cargo features are additive and unify per build.
ruvector-core's default set includesstorage, and other members of this workspace depend on it with defaults, so in asingle-invocation workspace build
ruvector-core/storageis on for everybody.VectorDB::newthen takes the#[cfg(feature = "storage")]path unconditionally(
crates/ruvector-core/src/vector_db.rs:38-73) and opens the placeholder as a realpath.
"memory://"is not a directory, hence rvlite's ENOENT;"sky-monitor-tracks.mem"is a single fixed relative path shared by every testprocess, hence sky-monitor's lock contention under a per-test-process runner.
So
default-features = falsedoes not do what both call sites assume, and the failureappears only in the exact configuration CI uses.
Why it is invisible today
Tests (core-and-rest)is cancelled attimeout-minutes: 240while still compiling,so none of these results are reachable. #784, #786 and #787 are what let that job get
to the test phase; these sixteen failures are waiting behind them.
Suggested direction
The choice between in-memory and persistent storage is a property of the caller's
request, not of who else is in the build graph, so it probably belongs in
DbOptionsrather than in a cargo feature — for example honouring a
memory://path (or anexplicit in-memory option) even when
storageis compiled in.memory-onlyalreadyexists as a feature name in
ruvector-core/Cargo.tomlbut carries no code, whichsuggests that intent was already there.
A narrower stopgap is to give each
VectorDBa unique writable path, which fixessky-monitor cleanly. It is a poorer fit for rvlite, where "memory://" is library code
and writing files would be a behaviour change rather than a test fix.
Happy to send patches for whichever direction you prefer.