リリースノート

バージョン 0.9.0

このリリースの変更点、移行メモ、互換性。

v0.9.4 向け GitHub でソースを見る ↗

0.9.0 is the stable release. It consolidates embedded resource management, transactions and recovery, typed storage, unified queries and cross-language contracts from 0.9.0-beta.1 through beta.4, and adds the embedded Console host protocol, safer migration publication and Windows opening-race fixes. Rust Embedded Core remains the single implementation authority for storage, transactions, queries and lifecycle semantics.

Versions, installation and channels

Rust crate, CLI and Server source, npm and Python package metadata all use 0.9.0; the tag is v0.9.0. Python supports 3.9–3.12. Use pip install "triviumdb==0.9.0", npm install triviumdb@0.9.0 or cargo add triviumdb@0.9.0. The stable npm package uses latest; existing beta tags and prerelease packages remain unchanged. Server and WebUI retain their nightly development and compatibility boundaries. Actual upload and public availability are determined separately from the corresponding registry and publishing workflow results.

Native tri-model queries, transactions and numerics

  • Rust, Python, Node and CLI share the vector, property-graph and JSON-document core. Cascades plans TQL, including parameterized Prepared queries, scalar/container projections, aggregation, paths, graph algorithms and vector/graph composition. Results, bindings, aliases, sorting and row budgets follow the same semantics.
  • Transactions maintain node existence in operation order and execute inserts, updates, deletes and edges through one implementation. Unique constraints evaluate final transaction state, allowing valid key exchanges. Preflight rejection leaves no first operation, committed ID allocation or partial WAL write.
  • WAL append, flush or synchronization failures isolate the writer. Application failures also isolate the instance and already-admitted shared queries from partial transaction state. Reopening follows actual commit boundaries; unwinding restores QuIVer suspension state. After a transport failure or error response, applications should query by business identity to confirm the transaction outcome.
  • Payload CRUD, transactions and $inc preserve representable integer precision; overflow, invalid types and nonfinite values are rejected before writing. Numeric indexes and TQL integer/float comparisons cover large integers, negative values, floating zero and exact range boundaries.
  • MATCH preserves parallel-edge multiplicity and counts a bidirectional single-hop self-loop once. Graph patterns and variable-length paths use bounded explicit stacks, account for exploration, scans and backtracking, and check cancellation/deadlines. Ordinary, exact and GraphFirst retrieval share dimension and finite-value validation.
  • Floating cosine uses f64 accumulation when norms, dot products or denominators overflow/underflow, while ordinary finite magnitudes retain existing SIMD paths. u64 retrieval preserves binary patterns and Hamming-match scoring without automatically adopting floating QuIVer. Default SM-L2 navigation and cosine reranking retain their existing implementation.

Multi-instance resources, shutdown and file locks

  • ResourceRuntime manages database reservations, temporary workspace, threads and task slots across instances while protecting maintenance capacity. Read materialization, graph traversal, index construction and loading admit instance/shared budgets before allocation; rejection releases reservations and preserves existing facts. Diagnostics distinguish memory estimates, reservations and shutdown stages.
  • Controlled shutdown stops new operations, drains actual in-flight work, persists data, and releases mappings, Hooks, handles and reservations. Successful close permits file-group moves and reopening even while callers retain Database, Prepared, result or Console objects. Failed close retains the lock, state and recovery evidence for retry after the cause is resolved.
  • Python contexts and Node close/dispose, resource management and worker termination use the core lifecycle. Waiting timeouts end the wait without cancelling persistence or releasing the file lock early.
  • Fixed an opening race with background-close publication: atomic Windows replacement can resolve a handle to an NTFS deleted-file path. Requested/canonical file identity is now checked before deriving a lock path. Failed preflight checks only an existing coordination file; actual contention returns TDB_DATABASE_LOCKED. If the lease has become available, the opener resolves the path under it, verifies coordination-file identity and transfers that same lease to the new instance.
  • Persistent absence, access failure or identity mismatch remains an error. Failure paths preserve the existing file set. ReadOnly preserves physical zero-write behavior; Immutable opens the validated generation directly. Unix symbolic links cannot substitute an idle alias coordination file for the target database's lease.

Typed storage, derived indexes and recovery

  • The v10 .tdb header persists dtype, element width and CRC. New databases establish a typed checkpoint before accepting WAL. Wrong dtypes are rejected before writing; Rom/Mmap validate exact vector-block length. Opening admits peak node/vector/Payload/graph/index/WAL decoding capacity before permitted migration or WAL-tail truncation.
  • Mmap .flush_ok v3 binds .tdb, .vec and generation-scoped .pld files. Undo journals and prior-generation backups recover interrupted publication. Complete corrupt WAL frames return CorruptedFile while preserving the log; physically incomplete tails and transactions without commit seals recover to completed commit boundaries. Recovery supports further interruptions and retry on the same handle.
  • .pidx v8 encodes composite fields as unambiguous JSON string arrays, preserving NUL, escapes and Unicode. Failed unique-schema publication isolates the instance; reopening adopts definitions according to the commit point and replays WAL. Legacy composite postings can scan authoritative facts; recreate ordinary composite indexes using their original field lists.
  • .quiver.meta v2 checks main/vector/index CRCs and complete ID/slot relationships. Legacy metadata follows MissingIndexPolicy fallback/error behavior; read-only fallback preserves originals. Graph copies validate endpoints, parallel labels, self-loops, weights and Metadata, with validation/decoding peaks admitted against budgets.
  • Failed Windows vector replacement/remapping that invalidates the current mapping moves the instance and shared handles into a recovery-required state, preserving the original I/O error and WAL for reopening after release.
  • Text registration replaces document content; empty text clears BM25 content and node deletion removes text/keywords. Deferred loading preserves prior text files during ordinary saves and merges explicit changes. Text registration remains outside transactional WAL operations; applications must retain authoritative, rebuildable text sources.

Dimension migration and immutable generations

  • Dimension migration builds an exclusive staging database and publishes its file group with non-overwriting atomic renames, replacing Beta.4's staging-to-destination hard links. Forced termination after the first file, before commit or after commit follows the publication journal: pre-commit destinations roll back, committed destinations remain complete, and sources remain unchanged.
  • Publication synchronizes relevant directories around commit. Filesystems must support exclusive atomic renaming; unsupported operations return I/O errors. Existing main files, sidecars and case aliases under actual filesystem rules are rejected before creating destination leases, staging or journals. Unix checks also preserve non-UTF-8 sidecars and reject dangling main-file links.
  • GenerationStore fixes canonical root/runtime directories; shared cross-instance and cross-process Reader leases protect old-generation reclamation. Runtime leases use a separate writable directory, keeping artifact directories read-only. Cooperating processes must share consistent roots and a writable runtime directory.

Embedded Console v1

  • Added Rust ConsoleSession, ConsoleHost, Database::console_request, Python db.console_request(session, request_json) and Node db.consoleRequest(session, requestJson). JSON-string requests share query, vector/graph, index, atomic transaction and batch-import semantics on an already-open instance.
  • Sessions default to read-only and bind to a specific instance, preventing reuse against a replacement at the same path. The Rust adapter holds only a weak reference; host and Console share one Mutex, and contention/reentry returns WouldBlock immediately. Detach stops entry and requests cooperative cancellation without closing the host database. Python retains exclusive native borrowing; the public Node loader blocks Console/host Hook reentry in both directions.
  • Host policy controls operation entry points, request/response bytes, operation counts, working sets and deadlines. The host also controls fine-grained TQL data permissions. Write plans and acknowledgement responses are admitted before WAL; response buffers reserve shared workspace across commit. Once commit starts, the transaction continues to its atomic completion point even if cancellation, timeout, or disconnection occurs.
  • Explicit node IDs and u64 vector components use decimal strings. f32/f16 input uses the core f32 conversion path and output returns actual numeric values. Payload JSON types remain unchanged; large-integer Payload/parameters require lossless host codecs. Existing numeric Node ID APIs and page writes retain JavaScript safe-integer limits.
  • The nightly Server crate adds a nestable HTTP Router over the same ConsoleHost, without reopening paths, creating a Writer Actor or owning listening/shutdown. Concurrency admission precedes body reading and lasts until actual blocking work ends. Body reading and execution share a deadline; the database mutex is released before network transmission.
  • The unmodified resource bundle contains HTML, versioned protocol, manifest, integration guide and license. Existing HTML still uses Server HTTP v1 and needs frontend-owned Console RPC v1 adaptation; the manifest declares that requirement and CDN dependencies. Console uses whole-request operations in this release. Offline mounting requires frontend integration; interactive transactions, OCC, idempotency caching, and NDJSON streaming remain outside this version's Console feature set. See host integration. Export with python scripts/package_console.py --output .tmp/console/triviumdb-console.zip.

Nightly Server, WebUI and release delivery

  • V4 Web Console provides light/dark themes, query tabs, result editing/batch actions, staged transactions, CSV/JSONL import, graph exploration and a vector workbench. Server serves the page with gzip/weak ETags and structured invalid-query-parameter errors; read TQL can follow the read path with mutation=true.
  • Includes the V4.1 R2 workspace: unified top navigation, draggable/keyboard-adjustable object/history/snippet sidebar, collapsed rail and persisted preferences. Language switching preserves queries/current-node state. Node identity cards and arbitrary scalar/aggregate/multi-column results retain raw data and export shapes; the object tree labels bounded samples, and vector-source/hit actions connect the current node to graph location. Canvas/Sigma share geometry, label priorities and floating-panel avoidance. UI writes stage by default and call existing atomic transactions after diff review; failures retain the queue and TQL writes remain independent. Interaction regressions, accessibility checks and Windows visual baselines are maintained alongside these changes.
  • Page edits, deletes and imports validate safe-integer IDs before sending/staging to prevent adjacent-node writes. Operations added during commit remain for the next batch; failed retries preserve ordering. Switching/closing query tabs cancels old work, and late JSON/NDJSON results cannot overwrite another tab.
  • Server and WebUI follow the nightly preview compatibility policy, with source and asset versions set to 0.9.0. Browser, visual and interaction diagnostics retain their separate manual workflow.
  • Rust, Python and Node preserve stable structured error codes and required details. Python stubs and public npm declarations ship with their interfaces; Node large-integer error fields can be number | string. npm builds preserve the maintained public loader.
  • Stable tags identify merged same-repository dev → master Release PR merge commits with successful master CI on that exact revision. GitHub Release bodies use this complete bilingual file. npm/PyPI summaries independently report actual success, failure, cancellation, confirmed existing-version skips and upstream blocking. Upload completion and registry public availability are checked separately.

Upgrade, compatibility and validation conditions

  1. Stop existing instances and back up a complete directory snapshot or file group before opening with the new version. Rom keeps main data/vectors in .tdb; Mmap uses .vec and generation-scoped Payload files. Preserve WAL, text and indexes as configured; copying only a live writable main file is insufficient.
  2. Upgrading from Beta.4 introduces no additional disk-format migration. Historical nonempty v5–v9 checkpoints are validated by geometry. Recover WAL-only or untyped-empty-checkpoint samples with logs using the original version, then complete a checkpoint. Downgrades use the full pre-upgrade backup.
  3. Retire old Readers before upgrading cross-process reclamation. Keep canonical roots, runtime directories and root location stable for live Readers. Apply the .pidx, .quiver.meta and graph-copy compatibility, fallback and rebuild policies above.
  4. Low-level Rust BQ distance, signature and raw-storage construction APIs return Result; callers propagate errors. Exhaustive error matches include new Prepared-parameter, budget and Console variants. Python/Node retain language-specific names/result wrappers; control flow should use error codes and fields.
  5. Validated feature-source coverage includes Linux/Windows/macOS, x86_64/ARM64, QEMU, installed wheel/npm packages, type consumers, controlled concurrency/recovery, and the actual ASan/TSan/Miri/short-fuzz configurations. Windows additionally completed 1000 debug and 500 release worker-exit/reopen iterations. Final release-commit and platform-artifact outcomes are determined by the CI/CD runs for v0.9.0; manual benchmark and mutation jobs require separate execution records. See testing, public API and lifecycle/snapshots.