Repository navigation
Release v0.5.44
[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
.grafeofile); 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 returnResult(create_node,create_edge,set_node_property,delete_node, the batch calls and the rest, onGrafeoDBandSession). 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 aGraphWriterinstead ofwith_transaction_context,with_validatorandwith_write_tracker;SetPropertyOperator::with_labelsandwith_edge_typeare 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'sNullOrderno longer flips for a descending key (SortKey::descendingsetsNullsFirst), andvalue_utils::compare_values_with_nullsis replaced bycompare_sort_values. - Breaking (Rust,
grafeo-core):FilterExpression::ExistsSubqueryandCountSubqueryhaveend_varandedge_var, andExistsSubqueryreadsmin_hopsandmax_hops. - Breaking (Rust,
grafeo-engine): the transaction manager's write and read sets holdGraphEntity(graph plus node or edge), the logicalExpandOphas aquantifiedfield, andRdfPlanner::with_walis no longer public. - Breaking (Rust,
grafeo-engine):ChangeEventhas agraphfield (Nonefor the default graph), andCdcLogkeys its events by graph and entity, withhistory_inandhistory_since_infor a named graph. - Breaking (Rust,
grafeo-adapters): the GQLQueryClause::InlineCallhasscopeandcombinedfields, and the CypherClause::CallSubqueryis a struct variant withquery,scope,unionsandunion_all. - CDC label change events:
labelsis now always the labels after the change, and the newbefore_labelsholds the previous ones. - Some queries that ran now fail with an error, as in openCypher: an expression in
WITHwithout a name; aCALLsubquery that returns an outer variable or reads one it does not import (CALL () { ... }, a CypherCALL { ... }without an importingWITH); an importingWITHwith aWHERE, alias,ORDER BY,SKIPorLIMIT;UNIONmixed withUNION ALL; and a Cypher query that ends with aCALLsubquery that returns rows (add aRETURNafter 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.grafeofile: the schema, indexes and RDF data were dropped (also atclose()), the periodic checkpoint wrote the pre-compaction store, andasync_write_snapshot()wrote little or nothing. Every checkpoint now writes the whole database. - A failed checkpoint could leave a
.grafeofile that no longer opened (#418). Checkpoints now write to<file>.checkpointfirst, 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
.grafeofile. wal_checkpoint()lost data in WAL-directory databases (#419). It now only syncs the WAL there, and open replays every WAL file.DurabilityMode::Adaptivenever synced the WAL, so it behaved likeNoSync, 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 CONSTRAINTdid nothing (#420). Constraints are now stored by name:CREATEandDROP CONSTRAINTsupportIF NOT EXISTS/IF EXISTS,SHOW CONSTRAINTSlists them, and unnamed ones get a name such asCity_name_not_null. Constraints from 0.5.43 files have no name and cannot be dropped by name.- Reopening a
.grafeodatabase orto_memory()lost its indexes (lookups on a reopened file scanned every node, #459), andto_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
rdfprofile kept no data across a reopen (#544); the facade'srdfprofile 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, andget_node,node_count,info(),schema()and similar did not see pre-compaction data (or panicked on awith_storedatabase). Queries aftercompact()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,REMOVEand 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 aftercompact()on a database opened read-only. All of these now fail. - Writes skipped schema checks:
SET,REMOVE,SET n:LabelandMERGEdid not check property types,NOT NULL,UNIQUE,NODE KEY, edge types, endpoint labels orDEFAULTvalues,UNIQUEdid not hold within a transaction, and multi-propertyUNIQUEandNODE KEYwere checked one property at a time. Every write is now checked likeINSERT, and a failedALTER NODE TYPEorALTER EDGE TYPEapplies all or none. - Parameterized queries skipped schema and constraint checks (#526), so
execute(query, params)in Python and Node.js could insert a duplicateUNIQUEvalue. 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 withMissing parameter: $ebefore it writes anything; unaliased columns were named after a parameter's value (RETURN $xgave a column5) and are now named after the query text; andPROFILEwas ignored when parameters were passed (#460). - Removed properties stayed visible as null without the
temporalfeature (as in the Python and Node.js packages);REMOVE n.pandSET n.p = NULLnow 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_countis now always 0), every hundredth commit scanned the whole store, and concurrent writes could deadlock withtiered-storage. - Lookups by
id()or an indexed property scanned every node (#454, #356), once per row for keys likeUNWIND $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 forINlists and edge endpoints. - Regular expressions and
LIKEpatterns 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): afterORDER BY,SKIP,LIMIT,DISTINCT, a laterUNIONbranch, a secondMATCH,OPTIONAL MATCH,EXISTS,CALL,UNWIND, grouping or a write, a returned edge could be0, 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)andrelationships(p)returned internal ids,UNWINDof them or of a function call afterMATCHreturned no rows, andEXCEPTandINTERSECTover nodes or edges returned the wrong rows. Nodes, edges and lists of them now keep their kind through every clause, also in Gremlinunion(outE(), out()). keys(r)of an edge returned null; it now lists the edge's keys, andkeys()of a node or edge returns them sorted, likeproperties().- 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 BYover 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 inpercentileContandpercentileDisc) could fail withdoes not correctly implement a total order(aPanicExceptionin Python).ORDER BYnow 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 BYfixes: GQLNULLS FIRSTandNULLS LASTwere reversed withDESC,RETURN * ORDER BY ...failed withVariable '*' not found in input, and sort keys could show up as extra columns (RETURN r AS e ORDER BY e.wreturned ane_wcolumn). - 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 afterWITH, inCALLsubqueries, 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, sosize(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
WITHin one statement (#479, #480): aMATCHafter a write missed the written data (and when it found nothing, the write did not run), and a GQLMATCHafterWITHfailed withVariable '...' not found in input. Clauses now read the rows the earlier ones pass on. EXISTSandCOUNTsubqueries 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 anyRobot), used only their start node from the row (EXISTS { MATCH (b)-[:KNOWS]->(a) }held wheneverbknew anyone), ignored a tie to the row through a value ({id: s.id}, an innerWHERE), could run inWHEREbefore 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 makesEXISTSfalse andCOUNT0.- GQL subqueries: in
EXISTS,COUNTandVALUE, eachMATCHclause matched on its own; anEXISTSthat starts withOPTIONAL MATCHfiltered rows;VALUE { ... RETURN count(x) }ignored its argument andDISTINCT; and aVALUEsubquery that is not a count gave every row the same answer, or failed inWHEREandWITH. They now behave as the same clauses do outside a subquery. - Cypher
OPTIONAL MATCHat the start of a query and inEXISTSandCOUNTfailed; it now runs, with one row of nulls when nothing matches. CALLsubqueries saw the wrong outer variables: a GQLCALLdid not see the outer row, so every row got every match; an importingWITH(in GQL, the firstWITHof the body) ignored itsWHEREandWITH a AS bimported the wrong value; and a CypherCALLwithout an importingWITHread outer variables as null. A GQLCALLnow sees every outer variable and itsWITHis an ordinary one, a CypherCALLsees those its importingWITHlists, and the scope clauseCALL (a, b) { ... }(CALL (*),CALL ()), which failed to parse, names them in both languages.- Nodes and edges a
CALLsubquery returned were copies of their properties: a laterMATCHfrom them failed or matched everything, andid(b)andtype(r)were null.RETURN *in aCALLalso returned nothing, and a two-edge chain in aCALLno rows. The subquery now passes on the nodes and edges themselves, andRETURN *returns the variables it binds. - Cypher
CALLbodies rejectedORDER BY,SKIP,LIMIT,UNION,DELETE,MERGE,REMOVE,FOREACHand a nestedCALL; they now run, as in openCypher (an orderedLIMITgives the top rows per outer row). A GQLCALLbody takesUNION,EXCEPT,INTERSECTandOTHERWISE. - An
OPTIONAL MATCHcondition that reads a variable bound before it dropped rows: inMATCH (a)-[:KNOWS]->(b) OPTIONAL MATCH (b)-[:KNOWS]->(c) WHERE c.age > a.age, abwhose 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. MERGEbound only the first of several matches: with two(:Tag {k: 1})nodes,MERGE (t:Tag {k: 1}) SET t.seen = trueset one of them. As in openCypher,MERGEnow binds every match, one row each, also for relationships and inupsert_edges.- GQL
NEXTdid not pass rows on: the statement afterNEXTmatched from every node and returned the first statement's columns too. It now reads the rows the one before returns, and only the lastRETURNis the result. - CDC history mixed graphs:
history(id)andchanges_betweenreturned the events of every graph's entity with that id. Each event now names its graph (graph, also in Python and Node.js),historyreads the database's default graph or the session's current graph, andchanges_betweenreturns every graph's events. - A variable a
WITHleft out failed with an internal error (MATCH (a) WITH 1 AS x RETURN a.name); it now fails withUndefined 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
.grafeofile, 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 arelationships(p)item or used another row variable. EXCEPT,INTERSECTandOTHERWISEdid not check their branches' columns (#481), and SQL/PGQ checked none of its set operations; they now fail likeUNION.- 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
INSERTwith unlabeled or already bound endpoints failed withUndefined variableor attached edges to the wrong node. - A
LOAD CSVrow 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 orNOTs 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()andgrafeo.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(), likeexecute(). - 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, sochanges_betweenandget_node_at_epochsee 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.countersreports nodes, edges, properties and labels created, set or removed. - Upserts by key:
upsert_nodes(labels, rows, key="id")andupsert_edges(...)create or update many entities by a key property and report created, updated and skipped rows. shuffle_unorderedtest option: returns rows withoutORDER BYin 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]->()andWHERE NOT (d)-->().
Internal
- CI gate and policy checks (#511): a single
CI Gatecheck to require before merging, and aPolicyjob 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 Policycheck applies the contribution rules in CONTRIBUTING.md. - Differential test:
scripts/difftestruns 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