रिलीज़ नोट्स

संस्करण 0.9.4

इस रिलीज़ के बदलाव, माइग्रेशन नोट्स और संगतता।

v0.9.4 के लिए GitHub पर स्रोत देखें ↗

TriviumDB 0.9.4 is a stable release of the embedded database. It brings the batched vector interfaces, ID-only search and WAL group-commit fixes from the two betas to the stable channel. It also corrects exact cosine rankings, graph traversal bindings and snapshot publication. Rust, PyPI and npm use version 0.9.4, with the latest dist-tag on npm. The accompanying HTTP Server remains a nightly interface.

Changes for applications upgrading from 0.9.3

  • Python wheels use PyO3 0.30 with abi3-py39 and support GIL-enabled CPython 3.9–3.15. Batch inserts and searches accept native-endian, two-dimensional C-contiguous memoryview inputs matching the database dtype. Node.js 22, 24 and 26 share a Node-API 8 module and accept Float32Array or BigUint64Array batches.
  • Single and batch ID-only searches avoid decoding and converting result payloads. Set ann_rerank_limit (annRerankLimit on Node.js) to control the QuIVer rerank pool separately. Builds for the same vector generation share one snapshot, and waiters receive confirmation after the index is published.
  • Multi-source shortest paths retain exact costs until the winning path is selected. Batch graph queries share traversal budgets, and path_truncated() reports capped path enumeration. WAL group commit preserves the strongest durability requirement of the writes in the group. Instance and shared memory budgets account for simultaneously live maintenance buffers, query workspaces and batch results.
  • The beta.1 notes and beta.2 notes detail the changes introduced during each prerelease.

Query and graph fixes since beta.2

  • Rust tql_nodes() uses explicit entity aliases and retains the source nodes of multi-variable expressions. Pattern and CREATE variables accept contextual keywords. Batch CREATE resolves repeated names through a lookup table. Console mutation limits count planned writes. Server index advice reflects the entry scan and the index kind required by its filter.
  • TQL selects property indexes using the node identity in scope after WITH. Each EXPAND result keeps its input bindings and skips null starting nodes from optional matches. GraphFirst enforces the distinct-anchor limit during matching, and structural ID projections skip payload reads. Batch edge creation reserves space for each copy of the label and endpoint variable names.
  • Repeated link calls update the edge weight and preserve metadata. Use upsert_edge to replace both. Payload patches reserve space to decode and copy the previous value. TQL rejects assignments to the structural node ID before matching.
  • TQL validates CREATE node bindings and edge weights before matching. EXPLAIN MATCH preserves edge variables and direction. Exact scans check cancellation per slot and report missing live vectors. FISTA residual recall uses exact cosine scoring. Node similarity iterates the ordered adjacency map directly.
  • Bitmap filters merge distinct candidates in node order. MATCH … COUNT(*) counts directly. ALL_PATHS aggregates during enumeration and breaks signed-zero ties by node sequence. Rust set operations compare full row identity. TQL IDS filters by node ID.
  • TQL preserves field spelling and metric provenance for computed node aliases. RFC 3339 filters order leap seconds and their fractions before the next UTC minute. Multiline HTML in Markdown quotes and lists retains literal text and source positions.
  • Reachability applies the exhaustion policy to the result limit. The Python and Node list APIs raise a structured error on exhaustion. Detailed APIs can return partial results with a truncation flag. Exhaustive Rust matches on BudgetDimension and Filter should cover the new Results and LeapSecondRange variants.
  • FIND can project IDs and counts without decoding payloads when an equality hash index covers the filter. TQL accounts for the actual edge field being copied. Triangle counting charges for forward edges and comparisons when intersecting sorted adjacency lists.

Vector, text and document retrieval

  • AC scores every occurrence of a registered alias, including overlapping matches. Text replacement and keyword deletion visit the affected node's postings. Standalone text and QuIVer index exports use private temporary files.
  • AC registration and matching use the same per-character Unicode case folding. Loading an existing keyword index merges equivalent terms and deduplicates their postings. CLI JSON node projections include outgoing edge metadata.
  • Exact cosine search and GraphFirst retain representable scores after repeated cancellation. GraphFirst resolves tied node bindings by full edge identity and checks cancellation during deduplication, scoring and output. Counting named edges by endpoint ID skips endpoint payload reads. Tight Markdown lists preserve line breaks between parent and child blocks.
  • Exact cosine search computes scores in double precision over the full range and rounds once to f32 before ranking and threshold filtering. Candidate workspace is bounded by the number of live vectors, while the scan still covers all physical slots.
  • DPP computes its cosine kernel in double precision so rotating identical candidate vectors preserves the number selected. Rust's cognitive::dot preserves finite results after large products cancel. HTML definition lists and page sections preserve word boundaries in extracted text and full-text search. CLI and core query diagnostics agree on line and column positions for CR, LF and CRLF.
  • Bidirectional shortest paths charge only relevant incoming edges during reverse expansion. Yen uses the cheapest parallel edge for each shared prefix step. Unrepresentable path products and harmonic centrality scores return query errors. The low-level Rust method TextIndex::search_ac now returns a Result; use ? to propagate build and cancellation errors. Hybrid search checks cancellation while accumulating BM25 postings.
  • Hybrid search returns TDB_QUERY_EXECUTION when a diffusion score exceeds the output range. Zero Leiden iterations leave singleton communities subject to the minimum size. Integer centroids round after averaging. JSON and Python integers round directly to f32.
  • Pelorus searches through the dedicated API, TQL and document ANN share lazy rebuilding under BuildInMemory. Detailed Node.js traversal returns stored edge direction, peak frontier size and depth reached. When the Server idempotency cache is disabled, keyed writes are rejected before execution.

With York registered on one node and New York on another, searching for New York York scores the first node 2 and the second 1. A filter can retain either node independently. To load the persisted text index on reopen, use load_text_index=True in Python or loadTextIndex: true in Node.js.

Snapshots, recovery, CLI and HTTP

  • If a CLI import record omits vector, the text diagnostic identifies the JSONL line. The JSON diagnostic returns TDB_INVALID_INPUT with target.field = "vector". The batch is rejected before commit.
  • Windows rejects trailing dots and spaces in new generation database filenames and can resume reclaiming older generations. Snapshot publication checks the file's type, dimension and live node count. Fact export and CLI compaction require an existing database. Fact restore accepts bare relative filenames. CLI import opens the source first and reports both input edge records and distinct edges.
  • Generation preparation enforces the 256-byte UTF-8 name limit. Retired databases whose filenames end in .manifest.json can be reclaimed after readers release their leases. TQL omits graph_id on whole default-graph edges and returns null for an explicit property projection.
  • Generation management operations coordinate on the physical store root. A reader's manifest lease blocks reclamation before a marker is written, even across different runtime directories. Snapshot publication and dimension migration distinguish lock contention from underlying I/O errors.
  • CLI JSONL import and offline migration decode each fact independently, preserving node payloads and edge metadata nested up to 127 levels. Windows generation reclamation checks the actual artifact names resolved by the filesystem.
  • HTTP bulk import requires UTF-8 application/x-ndjson with one JSON object per line and supports node payloads nested up to 127 levels. ID-only vector searches with zero graph depth and no custom hooks skip candidate payloads during DPP reranking.

Benchmark data and input validation

  • Python single-vector searches validate buffer shape before copying and consume at most one excess item from other sequences. Benchmark preparation uses batched double-precision cosine reference scores and verifies cached files and input settings. DiskANN conversion checks matrix sizes before writing.
  • ANN ground truth refines possible top-K candidates against the original vectors. Preparation validates vector shapes and finite values, neighbor ID ranges and per-row uniqueness. All prebuilt files come from one Hub commit. HDF5 normalization covers every training and query row, and MSMARCO consumes exactly the requested sample. Regenerate caches created by earlier preparation tools.

Installation, compatibility and verification

Shell
python -m pip install "triviumdb==0.9.4"
npm install triviumdb@0.9.4
cargo add triviumdb@=0.9.4

Current-format databases from 0.9.3 and both 0.9.4 betas open directly. The main file uses format 15, the WAL uses 7, and the index container uses 1. Take a directory snapshot before upgrading if a recovery copy is needed. If opening returns TDB_MIGRATION_REQUIRED, migrate into a new directory and verify it before changing the application's database path. External migration guide

Shell
python scripts/migrate.py --source /data/old.tdb --destination /data/current --check
python scripts/migrate.py --source /data/old.tdb --destination /data/current --execute

Rust applications calling TextIndex::search_ac, MemTable::build_text_index, MemTable::rebuild_property_indexes_from_definitions or nmf_multiplicative_update directly must handle their Result. Exhaustive matches should cover BudgetDimension::Results and Filter::LeapSecondRange.

Windows x64 verification covered Rust core, queries, storage, concurrency, fault injection, power-loss recovery, migration, CLI and Server HTTP, plus public contracts on installed Python and Node packages. Production-scale latency and QPS were outside this verification. See commit CI, Python and npm publishing and Server artifacts for platform and release results.