0.9.3 brings Pelorus hyperbolic search and per-request QuIVer SSD I/O accounting to the stable channel. For applications upgrading from 0.9.3-beta.1, the main changes cover write receipts, recovery, query results and resource budgets. The repository has moved to Astrmira/TriviumDB. The Cargo, PyPI and npm packages retain the name triviumdb.
Search capabilities for applications upgrading from 0.9.2
- QuIVer remains the default ANN index for ordinary vectors. Applications with fixed-curvature Poincaré ball vectors can select Pelorus, query Hot, Mmap or SSD storage, and scope searches to documents or named graphs. Vectors must satisfy
c · ‖x‖² < 1. The SDK returns geodesic distance and TQL exposes its negative throughsimilarity(_). Pelorus configuration and examples - QuIVer SSD reuses aligned pages within a generation and coalesces in-flight reads. Windows uses IOCP and Linux offers opt-in
io_uring. Fixed buffers are sized for device alignment and read spans. Rust exposes per-request counters throughmeasure_io, and Python and Node throughprofile_io. Direct I/O availability depends on the OS, filesystem and device. QuIVer I/O configuration
Recovery, publication and migration
- Checkpoint cleanup durably retires the publication journal before removing recovery backups. On Windows, control files use same-volume write-through moves. A sync error after a generation pointer switch carries
publish/unknown; callers can read the current generation to reconcile the outcome. - Generation reclamation records the validated artifact list and resumes after file handles are released. The external migration tool checks the published file header before reusing a Rom or Mmap destination.
- Offline migration checks for source artifact name conflicts before creating a directory. Preflight and reuse validate the published layout and report. Failed preflight runs release their temporary copies. Retry errors preserve the committed outcome after publication is confirmed.
- The migration tool reads current-format databases with Pelorus configuration and rebuilds the hyperbolic index in Rom or Mmap targets. A directory sync failure after rename reports
publish/unknown. Retrying confirms the destination and completes publication. - The CLI and Server node importers reject an entire batch containing reserved managed-document payloads before transferring archive references across databases. Payload
$incchecks that the full increment survives floating-point addition before writing to the WAL.
TQL, documents and indexes
- TQL preserves the left endpoint of MATCH, edge predicates after WITH, and metrics attached to each node binding. Sort functions resolve projected node aliases. Vector and text sources validate variable scope before execution. Numeric equality filters probe index membership directly.
- TQL applies assignments in statement order when a node matches several roles. Unordered MATCH pagination enumerates anchors by ID from the left of the pattern. FIND validates qualified references. Explicit LIMIT clauses respect console session caps. The interactive CLI uses the statement parser to dispatch MATCH mutations.
- Shorthand TQL vector search ranks the nodes matching its document predicate before taking Top-K. By default,
FINDpages by node ID. Explicit field ordering can page through an ordered index cursor.SET VECTORwrites each target once.MATCH … CREATErejects properties on previously bound nodes, and collection literals require separators between members. - FIND pagination resolves ordering against the actual projection for both direct and prepared queries. Node projections account for string literals per row. Empty membership predicates produce constant decisions, and index advice uses parsed field names.
- TQL deduplicates the full projection in multi-column
DISTINCTqueries. Rusttql_nodes()uses expression names for colliding aggregate columns. Subtraction accepts adjacent operands, and line comments end at CR, LF or CRLF. MATCH counts that depend only on row multiplicity skip node snapshots. - TQL supports comparisons adjacent to negative literals, parenthesized scalars on either side of a comparison and standalone null predicates. Named graph input errors report the validation phase. Document publication reserves shared memory before copying upload state.
- HTML and Markdown extraction skips the contents of script, style and template elements written with a self-closing slash. JSON and JSONL document ingestion preserves numeric literals with large exponents.
- Empty document selections return empty text and source spans. Python and Node edge updates can explicitly clear metadata. Both mapped and heap-backed hash indexes reject duplicate keys. Indexed property lookups stop verification once they establish that the result limit has been exceeded.
Graph algorithms, numerics and budgets
- TQL
GRAPHchecks node and edge counts and the view's base memory requirement before reading default-graph adjacency lists. A union counts each node ID once and retains each graph's edges. - Exact cosine uses a compensated dot product under severe cancellation. Weighted shortest paths and Yen compare full sums of edge weights. Pelorus filtering, exact result hydration, and document identity copies reserve instance and shared memory before allocation.
- Leiden preserves partitions under uniform weight scaling, retains self-loop degree during contraction and replaces centroids on recomputation. Graph workspace admission covers four adjacency directories and buffer growth. K-core selects by degree and weighted shortest paths break distance ties in full-path lexicographic order.
- BFS limits each frontier layer. Bidirectional shortest paths count distinct visited nodes. Induced PageRank and degree centrality count parallel edges and reject missing members. Degree centrality divides by the node count minus one, using one for a singleton. Named-edge matching and all-paths traversal stream adjacency lists.
- Parallel PageRank sums convergence residuals in node order. Graph diffusion evaluates attention in higher precision and keeps fully suppressed edges in the normalization denominator. Bidirectional traversal counts reciprocal edges separately and self-loops once. Graph algorithms admit edge scans before building adjacency lists, and node similarity stays within the Top-K pair capacity.
- Exact f16 scans reserve and widen the query once, share its components and norm across workers, and read candidate components directly. Both all-paths traversal APIs use an explicit stack and a shared path prefix for deep graphs.
- The console rounds JSON numbers directly to the target floating-point type. CLI searches by node use the stored vector dtype and preserve all u64 fingerprint bits. Single and batch Pelorus queries validate dimensions, finite values and ball membership before a lazy rebuild.
Rust, language bindings and Server
- Node TQL rejects unpaired UTF-16 surrogates. The low-level Rust methods
VecPool::push,update,zero_outand full-graphpagerankreturnResult. Direct callers can propagate errors with?. Named graph admission uses the maintained default graph edge count. Server advances the global ETag when a unique index change commits. - Python search hooks share a request-local
custom_datadictionary across stages. Errors resolving callbacks, decoding return values or converting the context propagate as hook errors. - HTTP transactions confirm idempotent receipts after the group WAL sync succeeds. If entity-version reads fail before that point, the server invalidates prior ETags. A retry with the same key can retrieve the original allocated IDs. Nested large integers in node, edge, search and TQL responses use the same decimal string encoding.
- Node and edge NDJSON imports honor idempotency keys and generation preconditions. The writer uses the remaining request deadline when deciding whether to wait for a batch. JSON and NDJSON label heterogeneous columns as mixed. Edge pagination counts in stable order and copies metadata only for the requested page. The server validates that its database path can be represented in UTF-8 before opening it.
- Atomic CLI imports support input-byte and operation limits. Console edge reads and path traversal apply session budgets before copying or expanding the graph. Harmonic centrality tracks discovered distances, variable-length paths use an explicit stack, and N-gram generation admits bounded character input before allocating grams.
- GraphFirst propagates request cancellation to scoring workers. Server transactions, compare-and-set and batch deletion inherit the writer request context. Batch deletion deduplicates and admits IDs before gathering edges. The QuIVer worker owns the final build status. Archived document queries and context expansion share a single reservation for decoding.
- Each database instance accumulates WAL, checkpoint and index-container write bytes. Windows and Linux report total page faults. Linux also reports minor and major faults separately. In Rust, the minor and major counters in
ProcessMemorySnapshotchange fromu64toOption<u64>so callers can handle platform availability.
Installation, compatibility and verification
cargo add [email protected]
python -m pip install "triviumdb==0.9.3"
npm install [email protected]Current-format 0.9.2 and 0.9.3-beta.1 databases open directly. The main file format is 15, the WAL format is 7 and the unified index container format is 1. The first writable checkpoint after upgrading from 0.9.2 publishes a WAL baseline seal. Take a full snapshot before upgrading and restore it for a rollback. Native Rust callers should handle the low-level Result returns and optional page-fault counters described above.
If opening returns TDB_MIGRATION_REQUIRED, run the 0.9.3 migration tool in check mode, migrate into a fresh directory, and point the application at the verified destination. External migration guide
python scripts/migrate.py --source /data/old.tdb --destination /data/current --check
python scripts/migrate.py --source /data/old.tdb --destination /data/current --executeTargeted Windows regressions cover named-graph admission, numeric heap and mmap indexes, migration publication retries and HTTP disconnects before a WAL write. Cross-platform acceptance is recorded against the merge commit and package artifacts against the tag. CI · Package publication