ملاحظات الإصدار

الإصدار 0.9.0-beta.3

التغييرات وملاحظات الترحيل والتوافق في هذا الإصدار.

للإصدار v0.9.4 عرض المصدر على GitHub ↗

This beta strengthens transactions, recovery, index consistency and numeric boundaries, and aligns values, bindings and return semantics across native tri-model TQL queries planned by Cascades. Rust, Python, Node.js and the CLI share these kernel behaviors.

Versions and installation

Shell
pip install "triviumdb==0.9.0b3"
npm install triviumdb@0.9.0-beta.3
cargo add triviumdb@0.9.0-beta.3

Rust, CLI, Server source and npm use 0.9.0-beta.3; Python/PyPI uses 0.9.0b3; the Git tag is v0.9.0-beta.3. The installation commands above select these exact versions. npm uses the beta channel and GitHub marks the release as a prerelease. Server and WebUI continue on the nightly development channel.

Transactions, writes and WAL recovery

  • Transaction preflight tracks node existence in operation order. An ID can be deleted, recreated, updated or deleted again. A duplicate insertion after recreation rejects the complete transaction before WAL writes, preserving facts, indexes, allocation state and the log.
  • Unique indexes maintain ownership from the final transaction state. A node may temporarily use another node's composite key before changing again or being deleted. Final projection preserves the other owner and supports valid atomic key swaps.
  • Commit preflight validates numbers, JSON, uniqueness and memory growth, then prepares validated application data. Unexpected application failures propagate and isolate the instance and shared queries; reopening replays the complete committed WAL. RAII restores paused QuIVer synchronization, and transaction IDs use a checked process-local monotonic counter.
  • WAL append, flush or sync failure quarantines the writer. Subsequent writes, group commits and checkpoints return WalClosed. Releasing and reopening the handle reconciles actual persisted state; applications can use business identifiers when retrying an operation whose durable outcome depends on the log.
  • Recovery validates semantic JSON, vector dimensions, finite values and ID bounds after frame and CRC checks. Invalid records return structured corruption errors and preserve the original WAL and checkpoint. Uncommitted transactions and truncated tails follow commit boundaries.
  • Ordinary CRUD, transactions and edge metadata share the reader's JSON depth boundary. Payload replacement, transaction updates and $set growth are admitted before WAL writes. $inc preserves integer precision and atomically rejects overflow, invalid types and non-finite results.
  • Snapshot manifest generation IDs share path-component validation, rejecting parent or absolute paths and invalid names at both the directory-store and lower-level writer interfaces.

Property indexes, graphs and persisted formats

  • Dropping a unique Hash index removes its matching constraint definition, keeping later writes and reopening consistent.
  • Ordered sorting and composite prefix/range paths select candidates according to actual field coverage, retaining missing fields, containers, booleans and nulls. Typed range candidates are selected before LIMIT/OFFSET and then checked by the complete predicate.
  • Composite unique keys preserve exact i64/u64/f64 types and values. Adjacent integers above 2^53 remain distinct. Ordered ranges and sorting use exact comparisons or scans at precision boundaries.
  • TQL equality candidates union exactly equivalent integer and floating keys, including 1 and 1.0. Hash/Bitmap document keys retain their JSON type semantics.
  • Hash, Ordered, Bitmap, Composite, N-gram and unique index creation share parsing/build peak admission and isolated candidate preparation. Budget rejection, invalid fields and uniqueness failures preserve existing definitions, caches and the WAL, allowing retries after quota adjustment.
  • Property sidecars use .pidx v7 and validate actual Payload bytes. Graph sidecars use .gidx v3 and validate main-file facts. Legacy property definitions rebuild in memory, and legacy graph access reads the main file. Read-only opening preserves physical files; writable checkpoints publish current formats.
  • Read-only graphs count actual incoming edges, preserving scoring, ordering and integrity checks for parallel labels. Removing the final incoming edge removes its zero-degree entry.
  • Graph writes validate the 65,535 UTF-8-byte label limit before the WAL. Heap accounting includes labels, metadata, adjacency capacity, reverse/label indexes, statistics and caches, with incremental updates for admission.

TQL returns, matched mutations and numeric domains

  • MATCH, FIND, WITH and named single-hop edges share expression evaluation, grouping, aggregates, DISTINCT, alias ordering and pagination. Computed expressions and node IDs form complete group keys. COUNT(expr) counts evaluated non-null values, and aggregate DISTINCT deduplicates the corresponding values.
  • Return columns are separate from input bindings. Unaliased aggregates expose expression names, and return aliases preserve other columns' source references. Literals use normalized default column names: RETURN 1, 2 returns two columns, while duplicate names fail explicitly.
  • WITH captures each row's values and entity identities at its execution point. All right-hand sides read the incoming scope before simultaneous assignment. Subsequent expansions retain source nodes, scalar values and JSON contents; converging sources keep distinct projection environments as logical rows. Snapshot memory counts toward instance and shared workspace admission, and reservations are released on completion, rejection or unwinding.
  • Scope validation recursively checks every variable in arithmetic, COALESCE and null expressions. Renaming preserves scalar types, and subsequent WITH clauses select retained columns explicitly. ORDER BY aliases preserve entity, path and container types and support entity/object field ordering.
  • Named single-hop edges retain bindings in WHERE, RETURN, null checks and aggregates, including anonymous endpoints. OPTIONAL MATCH validates starts before matching the pattern and WHERE; eligible starts without a matching suffix receive null columns. Repeated node variables constrain identity, and a self-loop counts once in a bidirectional binding.
  • Inline MATCH id conditions and node .id properties use complete unsigned structural IDs. FIND/MATCHES document conditions read Payload fields. Structural IDs and Payload id indexes use their respective domains for filtering and ordering.
  • Multi-field SET accumulates assignments per node and atomically replaces the payload, with the last assignment winning for repeated fields. MATCH … CREATE processes every complete match in a separate new-node scope; zero matches create zero nodes.
  • TQL literals, parameters, comparisons, projection, sorting and aggregation cover i64::MIN..=u64::MAX. Integer addition, subtraction, multiplication and SUM preserve integers; integer overflow returns Null. MIN/MAX retain selected values. Floating equality compares actual values, and division treats only signed zero as a zero denominator, accepting finite small divisors.
  • SEARCH, RANK, RESIDUAL and SET VECTOR convert numbers for the target dtype. u64 vectors retain full bit patterns and reject negative, fractional or out-of-range components; f32/f16 validate their converted finite ranges. Prepared SEARCH preserves integer parameters and checks missing/extra parameters, non-finite values and invalid slots. Default parameter column names are fixed before binding.

SDK numbers and Payload conversion

  • Python direct writes and transactions extract u64 vectors exactly. Payload conversion preserves the complete i64/u64 domain and converts tuples to arrays. Invalid objects, non-finite values and non-string dictionary keys fail explicitly. Outputs preserve exact Python integers.
  • Node validates safe numeric IDs and checks quantity arguments for finite, integral values within range before conversion. Numeric ID outputs follow the same safe domain. TQL returns oversized integer scalars and corresponding integers inside lists/objects as decimal strings, with complete string IDs for nodes and paths.
  • Rust/Python node IDs use 1..=u64::MAX-1; reserved values and exhausted allocation fail before the WAL. Node automatic, batch, transaction, TQL CREATE and migration operations validate returnable IDs before persistence.
  • Arrays, objects, nodes, edges and paths retain their expression types. COALESCE, IS NULL, COUNT, grouping and deduplication evaluate actual values. Rust uses TqlValue::Object; Python and Node return native objects.

Deterministic retrieval and accounting

  • BruteForce uses bounded partition Top-K heaps and merges by descending score and ascending external NodeId. Default QuIVer SM and public BQ paths use external NodeId tie-breaking during rerank admission and final truncation. Invalid public index queries follow their Vec-return contract; cold vector views validate dimensions and finite values.
  • QuIVer, Payload, graph, property posting and text hot-memory estimates use incremental counters or capacities, keeping admission accounting cost stable. Full graph statistics serve diagnostics, and property statistics retain field/type ordering across load modes.
  • The experimental append builder performs reverse pruning sequentially while preserving append and neighbor-selection behavior. Instance budgets account for managed heap and workspaces; RSS and OS page-cache behavior are recorded by their diagnostic metrics.

Rust API and file-group migration

  • Query literals and prepared values add UInt(u64), and results add TqlValue::UInt and TqlValue::Object. Exhaustive enum matches need the corresponding branches.
  • MutationAction::SetVector.vector, QueryEntry::Search.vector, RankClause.vector and ResidualStage.vector use Vec<serde_json::Number>. VectorType::from_json_number() provides a default conversion entry point that custom types may override. pipeline::lower_search_entry() returns Result, allowing conversion errors to propagate.
  • Physical rows add NodeRow.bindings and BindingValue; NodeRow::new() initializes empty bindings. The Rust node-result adapter resolves saved source identities.
  • Close existing instances, preserve the complete file group or directory snapshot, and open it with the new version. Legacy-sidecar loading and current-format publication follow the rules above. Use the corresponding original backup when returning to an earlier version. See the versioned lifecycle and snapshot guide.

Validation scope

Local Windows validation covers the Rust workspace, test-hooks interleavings, differential queries, I/O/power-loss faults, transaction guards, sector tearing, and rebuilt/installed Node and Python packages with lifecycle, typing and stub checks. Fixed language contracts assert complete results, numeric values, bindings and ordering. Persistence cases verify the WAL, reopened facts and physical read-only behavior.

Cross-platform, ASan, TSan, Miri, fuzz and published artifacts are recorded by their respective CI/CD jobs; Server follows its independent nightly workflow. See testing and the API reference for commands and public contracts.