Skip to content

sky-monitor and rvlite tests fail only in a workspace build: ruvector-core/storage is unified on #789

Description

@ohdearquant

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:24features = ["simd", "parallel"]
  • crates/rvlite/Cargo.toml:15features = ["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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions