Skip to content

Release v0.5.44

Choose a tag to compare

@StevenBtw StevenBtw released this 04 Oct 12:21
· 1119 commits to main since this release
2150b0f

[0.5.44] - 2026-10-04

Durability and consistency release. Crash-safe checkpoints and WAL recovery, indexes and constraints that survive a reopen, schema checks on every write path, per-graph conflicts and grants, commit and rollback in O(changes), and fixes for shortest paths, variable-length edges, list comprehensions, subqueries, OPTIONAL MATCH and MERGE. Plus graph handles, upserts by key and write counters.

Heads-up: 0.5.45 changes the on-disk format. 0.5.45 migrates a database automatically on first open (WAL-directory databases become a single .grafeo file); after that, 0.5.44 and older can no longer open it, so keep a backup if you may need to go back.

Changed

  • Breaking (Rust, grafeo-engine): the direct write methods return Result (create_node, create_edge, set_node_property, delete_node, the batch calls and the rest, on GrafeoDB and Session). Each call commits on its own with the checks of a query, so writing to a missing entity or endpoint, or deleting a node that still has edges, now fails. The bindings raise these errors.
  • Breaking (Rust, grafeo-core): the mutation operators take a GraphWriter instead of with_transaction_context, with_validator and with_write_tracker; SetPropertyOperator::with_labels and with_edge_type are gone.
  • Breaking (Rust, grafeo-core): operators that only order, cut, deduplicate or compare rows take no output schema (LimitOperator, SkipOperator, LimitSkipOperator, SortOperator, TopKOperator, DistinctOperator, ShuffleOperator, ExceptOperator, IntersectOperator).
  • Breaking (Rust, grafeo-core): a sort key's NullOrder no longer flips for a descending key (SortKey::descending sets NullsFirst), and value_utils::compare_values_with_nulls is replaced by compare_sort_values.
  • Breaking (Rust, grafeo-core): FilterExpression::ExistsSubquery and CountSubquery have end_var and edge_var, and ExistsSubquery reads min_hops and max_hops.
  • Breaking (Rust, grafeo-engine): the transaction manager's write and read sets hold GraphEntity (graph plus node or edge), the logical ExpandOp has a quantified field, and RdfPlanner::with_wal is no longer public.
  • Breaking (Rust, grafeo-engine): ChangeEvent has a graph field (None for the default graph), and CdcLog keys its events by graph and entity, with history_in and history_since_in for a named graph.
  • Breaking (Rust, grafeo-adapters): the GQL QueryClause::InlineCall has scope and combined fields, and the Cypher Clause::CallSubquery is a struct variant with query, scope, unions and union_all.
  • CDC label change events: labels is now always the labels after the change, and the new before_labels holds the previous ones.
  • Some queries that ran now fail with an error, as in openCypher: an expression in WITH without a name; a CALL subquery that returns an outer variable or reads one it does not import (CALL () { ... }, a Cypher CALL { ... } without an importing WITH); an importing WITH with a WHERE, alias, ORDER BY, SKIP or LIMIT; UNION mixed with UNION ALL; and a Cypher query that ends with a CALL subquery that returns rows (add a RETURN after it). Before, they gave wrong or silently null results, or failed with an internal error (see Fixed).

Fixed

Every query result in the differential test corpus that differs from 0.5.43 is listed, with its reason, in scripts/difftest/reviewed/0.5.44.txt.

  • Checkpoints after compact() left data out of the .grafeo file: the schema, indexes and RDF data were dropped (also at close()), the periodic checkpoint wrote the pre-compaction store, and async_write_snapshot() wrote little or nothing. Every checkpoint now writes the whole database.
  • A failed checkpoint could leave a .grafeo file that no longer opened (#418). Checkpoints now write to <file>.checkpoint first, so the last good state stays readable; this needs free disk space for a second copy of the file.
  • Edges appeared twice after a checkpoint followed by a crash (#417). Replay now skips entities the file already holds and repairs affected databases, and checkpoints trim the sidecar WAL.
  • Direct writes were not durable until close() (#395). Each call is now durable when it returns, and batch calls are recovered completely or not at all.
  • Concurrent transactions could corrupt WAL recovery (#411): one session's rollback could erase another's commit, and open or rolled-back writes came back on reopen. Each transaction is now logged as one group at commit.
  • Two processes could open the same WAL-directory database (#405); it is now locked like a .grafeo file.
  • wal_checkpoint() lost data in WAL-directory databases (#419). It now only syncs the WAL there, and open replays every WAL file.
  • DurabilityMode::Adaptive never synced the WAL, so it behaved like NoSync, and backups missed writes made while they ran; those now land in this backup or the next.
  • Schema changes, constraints and create_graph() / drop_graph() were lost on WAL replay (#421, #422). An unknown WAL record now fails the open instead of being skipped.
  • DROP CONSTRAINT did nothing (#420). Constraints are now stored by name: CREATE and DROP CONSTRAINT support IF NOT EXISTS / IF EXISTS, SHOW CONSTRAINTS lists them, and unnamed ones get a name such as City_name_not_null. Constraints from 0.5.43 files have no name and cannot be dropped by name.
  • Reopening a .grafeo database or to_memory() lost its indexes (lookups on a reopened file scanned every node, #459), and to_memory() also dropped the schema, constraints and property history. WAL-directory databases still lose their indexes until 0.5.45 (#401).
  • Rust builds with only the rdf profile kept no data across a reopen (#544); the facade's rdf profile now includes the LPG store.
  • Embeddings changed while their vector index was spilled reverted on reload (#522).
  • Sessions and direct reads after compact() missed parts of the database: SPARQL writes were lost, CDC missed queries, the selected graph was ignored, and get_node, node_count, info(), schema() and similar did not see pre-compaction data (or panicked on a with_store database). Queries after compact() are still not written to the WAL, so a crash loses them; direct calls are logged.
  • Grants and read-only modes did not stop every write (#413): use_graph() skipped the grant check, read-only grants allowed writes, and read-only transactions, roles and databases let non-GQL languages and the direct API write. A session whose graph was dropped also fell back to the default graph; it now fails.
  • Transactions: a failed statement inside a transaction kept its partial writes (it is now undone, and the transaction goes on); a commit that failed with a write-write conflict left the transaction active (#409); a transaction could not delete what it had created; transactions in different named graphs raised false write conflicts; and rolled-back nodes still counted in the planner's statistics.
  • Writes that should fail went through: SET, REMOVE and label changes on a node or edge deleted earlier in the statement or transaction (now ... does not exist or has been deleted in this transaction, as in openCypher), writes from a session reading at an earlier epoch (set_viewing_epoch, execute_at_epoch), and writes after compact() on a database opened read-only. All of these now fail.
  • Writes skipped schema checks: SET, REMOVE, SET n:Label and MERGE did not check property types, NOT NULL, UNIQUE, NODE KEY, edge types, endpoint labels or DEFAULT values, UNIQUE did not hold within a transaction, and multi-property UNIQUE and NODE KEY were checked one property at a time. Every write is now checked like INSERT, and a failed ALTER NODE TYPE or ALTER EDGE TYPE applies all or none.
  • Parameterized queries skipped schema and constraint checks (#526), so execute(query, params) in Python and Node.js could insert a duplicate UNIQUE value. They now run exactly like the same statement with literals.
  • Parameters: a statement that used a parameter nobody supplied stored the text $e (INSERT (:P {e: $e})) or failed with an internal error, and now fails with Missing parameter: $e before it writes anything; unaliased columns were named after a parameter's value (RETURN $x gave a column 5) and are now named after the query text; and PROFILE was ignored when parameters were passed (#460).
  • Removed properties stayed visible as null without the temporal feature (as in the Python and Node.js packages); REMOVE n.p and SET n.p = NULL now remove the property.
  • Commit and rollback got slower as the database grew (#410): a one-node insert took 36 ms at 1M nodes. They now cost only as much as the change.
  • Slow paths on large databases: setting a property got slower with the node's property count (NodeRecord::props_count is now always 0), every hundredth commit scanned the whole store, and concurrent writes could deadlock with tiered-storage.
  • Lookups by id() or an indexed property scanned every node (#454, #356), once per row for keys like UNWIND $rows AS row MATCH (n {id: row.id}), and with a label (MATCH (n:File {id: 'x'})) every node of that label was collected. They now seek directly, also for IN lists and edge endpoints.
  • Regular expressions and LIKE patterns were compiled for every row (#458); each is now compiled once.
  • Nodes and edges came back as IDs, as 0, or read another entity's properties (#482): after ORDER BY, SKIP, LIMIT, DISTINCT, a later UNION branch, a second MATCH, OPTIONAL MATCH, EXISTS, CALL, UNWIND, grouping or a write, a returned edge could be 0, a node or edge a raw ID, and a property could come from the entity of the other kind with the same ID (MATCH (a)-[r]->(b) RETURN r ORDER BY r.w). collect() and group keys returned nodes and edges as IDs, nodes(p) and relationships(p) returned internal ids, UNWIND of them or of a function call after MATCH returned no rows, and EXCEPT and INTERSECT over nodes or edges returned the wrong rows. Nodes, edges and lists of them now keep their kind through every clause, also in Gremlin union(outE(), out()).
  • keys(r) of an edge returned null; it now lists the edge's keys, and keys() of a node or edge returns them sorted, like properties().
  • A variable used as both a node and an edge matched by a coincidence of IDs (MATCH (r) MATCH ()-[r]->()); it now fails with an error that names the variable.
  • ORDER BY over values of different types failed or depended on the input order: values of different types compared as equal, numbers among them and around NaN came out of order, lists and maps were not ordered, and such a sort (also in percentileCont and percentileDisc) could fail with does not correctly implement a total order (a PanicException in Python). ORDER BY now uses the openCypher total order: maps, lists, paths, temporal values, strings, booleans, numbers, then null; integers and floats compare exactly and NaN sorts after infinity.
  • Other ORDER BY fixes: GQL NULLS FIRST and NULLS LAST were reversed with DESC, RETURN * ORDER BY ... failed with Variable '*' not found in input, and sort keys could show up as extra columns (RETURN r AS e ORDER BY e.w returned an e_w column).
  • Patterns through variables bound earlier matched too much: a path back to an earlier node (MATCH (a)-->(b)-->(a)) returned every two-hop path instead of the cycles, and a pattern through a bound edge (MATCH ()-[r]->() MATCH (x)-[r]->(y)) matched every edge of its shape, also after WITH, in CALL subqueries, in stored procedures and after a shortest path. Both now use what the variable holds.
  • Variable-length edges: the edge variable held only the last edge, a property map was checked only on the last hop, and a one-hop quantifier (*1..1, *1, GQL {1,1}) bound a single edge, so size(rs) returned null. The variable is now the list of the path's edges.
  • Shortest-path searches returned pairs without a path and ignored hop bounds (#514). Unreachable pairs no longer get a row, ->+ finds the shortest cycle, and the path must fit the quantifier.
  • Clauses after a write or a WITH in one statement (#479, #480): a MATCH after a write missed the written data (and when it found nothing, the write did not run), and a GQL MATCH after WITH failed with Variable '...' not found in input. Clauses now read the rows the earlier ones pass on.
  • EXISTS and COUNT subqueries gave wrong answers (#543): they checked only a path's first edge (missing multi-hop matches and minimums like *2..), ignored the rest of their pattern (EXISTS { MATCH (a)-[:KNOWS]->(b), (c:Robot) } held without any Robot), used only their start node from the row (EXISTS { MATCH (b)-[:KNOWS]->(a) } held whenever b knew anyone), ignored a tie to the row through a value ({id: s.id}, an inner WHERE), could run in WHERE before their variables were bound, and counted edges the query could not see. Each row now gets its own answer from the whole pattern, and a null node makes EXISTS false and COUNT 0.
  • GQL subqueries: in EXISTS, COUNT and VALUE, each MATCH clause matched on its own; an EXISTS that starts with OPTIONAL MATCH filtered rows; VALUE { ... RETURN count(x) } ignored its argument and DISTINCT; and a VALUE subquery that is not a count gave every row the same answer, or failed in WHERE and WITH. They now behave as the same clauses do outside a subquery.
  • Cypher OPTIONAL MATCH at the start of a query and in EXISTS and COUNT failed; it now runs, with one row of nulls when nothing matches.
  • CALL subqueries saw the wrong outer variables: a GQL CALL did not see the outer row, so every row got every match; an importing WITH (in GQL, the first WITH of the body) ignored its WHERE and WITH a AS b imported the wrong value; and a Cypher CALL without an importing WITH read outer variables as null. A GQL CALL now sees every outer variable and its WITH is an ordinary one, a Cypher CALL sees those its importing WITH lists, and the scope clause CALL (a, b) { ... } (CALL (*), CALL ()), which failed to parse, names them in both languages.
  • Nodes and edges a CALL subquery returned were copies of their properties: a later MATCH from them failed or matched everything, and id(b) and type(r) were null. RETURN * in a CALL also returned nothing, and a two-edge chain in a CALL no rows. The subquery now passes on the nodes and edges themselves, and RETURN * returns the variables it binds.
  • Cypher CALL bodies rejected ORDER BY, SKIP, LIMIT, UNION, DELETE, MERGE, REMOVE, FOREACH and a nested CALL; they now run, as in openCypher (an ordered LIMIT gives the top rows per outer row). A GQL CALL body takes UNION, EXCEPT, INTERSECT and OTHERWISE.
  • An OPTIONAL MATCH condition that reads a variable bound before it dropped rows: in MATCH (a)-[:KNOWS]->(b) OPTIONAL MATCH (b)-[:KNOWS]->(c) WHERE c.age > a.age, a b whose matches all failed the condition lost its row instead of keeping it with nulls. The condition now decides which matches count, in GQL and Cypher.
  • MERGE bound only the first of several matches: with two (:Tag {k: 1}) nodes, MERGE (t:Tag {k: 1}) SET t.seen = true set one of them. As in openCypher, MERGE now binds every match, one row each, also for relationships and in upsert_edges.
  • GQL NEXT did not pass rows on: the statement after NEXT matched from every node and returned the first statement's columns too. It now reads the rows the one before returns, and only the last RETURN is the result.
  • CDC history mixed graphs: history(id) and changes_between returned the events of every graph's entity with that id. Each event now names its graph (graph, also in Python and Node.js), history reads the database's default graph or the session's current graph, and changes_between returns every graph's events.
  • A variable a WITH left out failed with an internal error (MATCH (a) WITH 1 AS x RETURN a.name); it now fails with Undefined variable 'a'.
  • A Cypher pattern comprehension inside a function call, an aggregate or a map projection failed (RETURN size([(a)-->(b) | b])); it now runs.
  • A transaction on a .grafeo file, a WAL directory or a compacted database did not see the type of an edge it had created until the commit.
  • List comprehensions, list predicates and reduce() lost items (#538) when the expression called a function, read a property of a relationships(p) item or used another row variable.
  • EXCEPT, INTERSECT and OTHERWISE did not check their branches' columns (#481), and SQL/PGQ checked none of its set operations; they now fail like UNION.
  • Cypher =~ matched any part of the string; it now has to match the whole string, as in openCypher.
  • Cypher and SQL/PGQ checked only the first label of some node patterns (#513), e.g. MATCH ()-[r]->(n:A:B).
  • GQL INSERT with unlabeled or already bound endpoints failed with Undefined variable or attached edges to the wrong node.
  • A LOAD CSV row returned whole was null instead of the row's map.
  • Times with UTC offsets compared inconsistently; they now compare by instant.
  • toString() returned an internal form for temporal values, lists and maps; it now gives ISO 8601 text and literal form.
  • Very long ^ chains or runs of signs or NOTs could overflow the parser stack.
  • Docs: fixed the Discord invite and the GQL constraint examples (#344).

Deriva

Changes for Deriva, which generates ArchiMate models from software repositories and keeps its graph in an embedded Grafeo database through the Python binding.

  • Deterministic Louvain: the same partition on every run, with communities numbered from 0 by their smallest node id.
  • Python: grafeo.features() and grafeo.build_info(): the compiled-in languages and capabilities, plus version, git commit and build profile.
  • Dotted access into map properties: n.meta.route (also chained) in GQL and Cypher; a missing key gives null.
  • The direct API follows the selected graph set with set_graph(), like execute().
  • Graph handles: db.graph(name) scopes queries, the direct API and transactions to one graph, usable side by side and across threads.
  • Direct writes are checked against the schema and constraints like INSERT, and advance the epoch, so changes_between and get_node_at_epoch see them in order.
  • CDC events say what changed: labels, edge type and endpoints, the last properties on delete, and one create event per entity created in a transaction.
  • Write counters: result.counters reports nodes, edges, properties and labels created, set or removed.
  • Upserts by key: upsert_nodes(labels, rows, key="id") and upsert_edges(...) create or update many entities by a key property and report created, updated and skipped rows.
  • shuffle_unordered test option: returns rows without ORDER BY in random order, to catch code that relies on an order that is not guaranteed.
  • Batch edges with properties, batch nodes with several labels (#462).
  • Cypher pattern predicates in WHERE: WHERE (d)-[:CONTAINS]->() and WHERE NOT (d)-->().

Internal

  • CI gate and policy checks (#511): a single CI Gate check to require before merging, and a Policy job for crate boundaries, toolchain pins and public-text rules.
  • CI toolchain pins restored (#509); Dependabot no longer bumps the Rust toolchain.
  • Pull request eligibility check: a PR Policy check applies the contribution rules in CONTRIBUTING.md.
  • Differential test: scripts/difftest runs a GQL and Cypher query corpus on the previous release and on a release build of a commit, and fails on any changed result that was not reviewed for the release; it also compares GQL with Cypher within one run.
  • Browser WASM size limit: the CI limit for the gzipped browser build is now 760 KB (warning at 740 KB); the build is about 730 KB after this release's fixes.

What's Changed

Full Changelog: v0.5.43...v0.5.44