Release 0.6.2 #754
StevenBtw
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
[0.6.2] - 2026-11-08
Correctness release: comparisons, nulls and operands of the wrong kind follow ISO GQL and openCypher more closely, a refused permission has its own code, a session can be kept from reading local files, and a graph cleared and written back keeps its size. Results that change on upgrade: a string never equals a number,
{k: NULL}in a pattern finds nothing, an operator given a value of the wrong kind raises 22G12 where it answered null, and a file database checkpoints by itself (Changed lists each). Plus join orders from sampled degrees, cycles closed by intersection and lookups that need no index.Performance
IN: a hop to a pinned node starts at that end when it costs less, a key on several nodes reads the shorter side, and a long constantINlist is a set.LIMITstops early, and reopened columns skip chunks by their stored bounds.UNIQUEandNODE KEYbuild an index on their first property, so an insert under one no longer reads the whole label.max_flowandmin_cost_max_flowread each edge's weight directly instead of loading the whole edge; Dijkstra takes about a third fewer instructions.walfeature no longer pulls in tokio; onlyasync-storageandserverdo.Changed
Queries that ran in 0.6.1 and now fail or behave differently.
CREATE INDEXholds its label only: writes on other labels no longer pay for it. A query on another label scans, with the same rows and a note inEXPLAIN; a query with no label reads the label indexes and scans only the rows they do not cover. Existing indexes stay as they are, andcreate_property_indexstill covers every label. A 0.6.1 release opens such a file with the same rows, without those indexes, and a checkpoint there drops them.REMOVEfails withG2000when it would take a node's last label or the label that declares a property it holds, and so does removing a label an edge type's endpoints need, wherever that rule applies.import_tsv,import_tsv_strandimport_mmiofail the same way when the graph's rules refuse_Importednodes or the edge, as does dropping or replacing a property that nodes or edges still hold.DROP NODE TYPEandDROP EDGE TYPEare refused while a closed graph type bound to a graph lists the type. Files already holding such data still open.|,!,%and parentheses in the labels of anINSERTor a single-nodeMERGEare an error naming the statement, as they name no labels.GRAFEO-V001, and so does a commit whose writes break a rule added since the transaction began.validate()reports affected types, and Python warns at open. Dropping a graph type drops the types only it listed, and a second, different declaration of a type is refused. See the upgrade note.START TRANSACTION,COMMITandROLLBACKon a per-callexecuteare refused,CREATE GRAPH ... AS COPY OFis refused in a transaction, and no SPARQL statement runs after a SPARQL graph operation until the commit.'5' = 5is false and'5' <> 5true, in GQL and Cypher, also in indexes, joins,IN,MERGEand upserts;id(n) = '5'finds nothing. In GQL, a node compared with=to another kind of value is false instead of an error.[null] = [null]and[1] = [null]drop the row in aWHERE, while a definite mismatch such as[1, 2] = [null, 3]is false. A value containing a null matches nothing in a join or a lookup.DISTINCT, grouping andUNIQUEstill treat nulls as one value.<,<=,>and>=: GQL orders them as ORDER BY does (a string before every number, a boolean before every number), with or without an index; Cypher and Gremlin answer null; SQL/PGQ raises 22G04, as do its=,<>andIN, whichever plan reads them (an index or key-column read returned rows where the scan raised).true + 1,-'a',[1, 2, 3][1.5]) raises invalid value type (22G12) instead of answering null; a sign on a non-number reports 22G12 rather than 22G03. A null operand still gives null.+of a string and another kind in GQL raises invalid value type (22G12) in either order, for any non-null value that is not a string ('x' + 3gave'x3','is:' + truegave'is:true').db.algorithmsmethods;grafeo.pagerank(2.0), a negativemax_iterations, a NaN tolerance or a negativekran with meaningless results or clamped values (in Python,pagerank(damping=2.0)returned scores like 39,602,142,754). A missing required argument, or null for it, raises 22023 too, naming the argument and its type (it raised 22000). In the Python algorithm methods,Nonefor an optional argument means its default, andNonefor a required one raisesGrafeoError22023 instead ofTypeError. The load procedures take their arguments in the map or the positional form (path, thenlabels, ortype,sourceandtarget), raise 22023 for a delimiter that is not one character, an unknown column type, a wrong key insourceortarget(an unknown key was ignored) or aprojection(it was ignored), and 22G03 for an argument of the wrong type.grafeo.max_flowandgrafeo.min_cost_max_flowrows: one row per edge that carries flow, so parallel edges each get a row; they gave one row per node pair.grafeo.topological_sorton a graph with a cycle raises a data exception (22000) naming one cycle, such as3 -> 5 -> 8 -> 3; it returned a row in an undocumentederrorcolumn. The Python method still returnsNonefor a cycle.grafeo.kruskalandgrafeo.primreturn the one with the lowest edge ids (it depended on the order edges were read).wal_salvage: reopen it once withwal_salvage, which sets the empty file aside and loses no commit (A panic while rotating a WAL segment blocks checkpoints until reopen #725).GRAFEO-S005, naming the cause: no backup cursor, a chain behind the cursor, or log that was removed. Some of these raised an invalid-input error. A new full backup starts a new chain (Commit and backup paths under load #673).checkpoint_wal_size=None(Python),checkpointWalSize: null(Node.js) orConfig::without_checkpoint_wal_size(). The WAL's segment size is a setting (wal_segment_size, 1 MiB to 1 GiB, 64 MiB by default), and a checkpoint size below 1 MiB is refused.Config::with_memory_limitis enforced (#751): every write that grows the store (a node, edge or value write in GQL, Cypher, the direct API, a bulk load or a CALL, an RDF triple in each form, a property, text or vector index build) is granted against the limit, with an eviction pass that spills what it can first, and one that passes it is refused withGRAFEO-S001; reads that fit their query-memory budget still run. A database file above its limit opens with a warning (MEMORY_LIMIT_PASSED) and replays regardless of it, so its first write is refused. Under pressure a file database spills its older row groups' indexed embedding columns and keeps the newest's; a write into a spilled column needs no room for it.Config::with_query_memory_limit(#751): it caps what one statement's operators hold, defaults to the memory limit and never exceeds it; a sort or grouping past it spills first and, where it cannot spill, fails withGRAFEO-S001naming the limit and changes nothing.memory_usage()reports it asquery_limit_bytes, in every binding.Config::with_memory_fractionapplies per open: it is taken of the memory detected when the database opens, and a database file no longer stores its bytes;with_memory_limitis stored as before.file:URLs follow RFC 8089: inLOAD CSV,LOAD DATAand the load procedures,file:///srv/data.csvandfile://localhost/srv/data.csvname the absolute path/srv/data.csv(file:///was stripped and the rest read as a relative path), and afile:URL with another host is refused.42501, withGRAFEO-Q007for a write, DDL or writing procedure that the session's role or graph grants refuse andGRAFEO-Q008for a statement that reaches outside the database on a session without external access; both wereGRAFEO-Q002with42000. Python raisesGrafeoPermissionError, a subclass ofGrafeoError.memory_usage()reports what the store holds: its store, index, version and string-pool figures are the counted bytes, kept as each write grows them, instead of estimates.SKIPorLIMITafter a GQLCALLraises 22G02, as in every otherRETURN; 0.6.1 ignored the count.TierOverride::ForceDiskis refused on sections that cannot spill: onlyVectorStorecan move to disk, soForceDiskon another section (TextIndex,PropertyIndex,LpgStore,RdfRing,CompactStoreand the rest) now failsConfig::validate, where it was accepted and did nothing.LOCAL DATETIMEproperty refusesDATETIME '...'with an offset, and a schema error names the value as the query writes it (DATETIME '...', offset kept).Added
CALL grafeo.ktruss()andgrafeo.ktruss(k),grafeo.total_triangles()andgrafeo.subgraph_isomorphism(pattern_edges, pattern_nodes), and the Python methodsktruss(k=None)andsubgraph_isomorphism_count(pattern_edges, pattern_nodes).QueryResult::warningsand on streaming results, in every binding (Python also raises them throughwarnings.warn), and the CLI prints them on stderr. Experimental.||concatenates strings and lists.CALL grafeo.procedures()and the CSV load procedures are listed in every build, with each argument's type, default and allowed values where it declares them. A call of a procedure this build leaves out fails withGRAFEO-Q004, naming the feature that brings it, instead of as an unknown name.Identity::with_external_access(false)refuses every statement that reads or writes outside the database, such as the CSV loads, before it runs.GrafeoOptionswithgrafeo_open_with_options), Node.js, Python, Go, C# and Dart take the settingsConfigtakes, and WASM takesDatabaseOptions.memoryLimitandhistoryRetention;memory_usage()reads them back in each binding (C reports them and the open's warnings as JSON,MEMORY_LIMIT_PASSEDamong them), an open past the limit warns and still reads, and a snapshot import takes them too (Database.importSnapshot(data, options)in WASM,GrafeoDB::import_snapshot_with_configin Rust).db.session(read_only=..., external_access=...)in Python,db.session({ readOnly, externalAccess })in Node.js andgrafeo_session_openin C run queries with those limits;external_access=Falserefuses every statement that reads or writes outside the database.CALL grafeo.procedures()lists whether it writes the graph (writes, a BOOLEAN) and what it reaches outside the database (external_access:'none','reads'or'writes').grafeo.pagerankwarns (01Y01) when it runs out of iterations before its scores settle withintolerance.Config::with_wal_retention_limit(1 GiB by default; Pythonwal_retention_limit, NodewalRetentionLimit). Past the limit the oldest log is removed with a warning, and the next incremental backup fails withGRAFEO-S005.release_backup_cursor()(Rust, Python, Node, C, C#) stops keeping log for backups (Commit and backup paths under load #673).Deprecated
ZONED DATETIME '...'andZONED TIME '...'literals: writeDATETIME '...'orTIME '...'with an offset. They warn with 01X01 and 01X03, and 0.7.0 refuses them.+on two lists in GQL and SQL/PGQ: use||. It warns with 01X02, and 0.7.0 refuses it.Fixed
IS,&,|,!,%and parentheses were ignored there, soMATCH (x IS A)-[:R]->(t)also matched nodes withoutA, and aSET,REMOVEorDELETEafter it changed them. All GQL and SQL/PGQ path patterns now check them (A label expression on a path's first node is ignored, so reads return and writes change other nodes #736).INSERT (n IS Person),INSERT (n:A&B)andMERGE (n IS Person)created a node with no labels;IS AandA & Bnow set those labels. Databases written before this may hold such nodes, and nodes changed or deleted by the query above, which no fix can recover: find unlabelled nodes withMATCH (n) WHERE size(labels(n)) = 0 RETURN n.UNIQUErefuses0.0and-0.0as duplicates whether or not the property has an index.UNIQUE,NODE KEYandMERGEtreat1,1.0e0and the decimal1.0, and[1]and[1.0], as one value, andUNIQUEandNODE KEYcount every NaN, of either sign, as one value..after aFILTER,OPTIONAL,MINUS,GRAPHor nested group parses again (SPARQL: a '.' after a FILTER, OPTIONAL, MINUS, GRAPH or nested group is refused, though grammar [54] allows it #737).GRAPH ?gbinds?g(SPARQL: a sub-SELECT inside GRAPH ?g reads the named graph but leaves ?g unbound #739),BIND(EXISTS {...} AS ?v)evaluates (SPARQL: BIND(EXISTS { ... } AS ?v) fails with GRAFEO-X001 (subquery expression in this position) #740), andEXISTSandNOT EXISTSread each row's values, as the SPARQL 1.2 draft says.?s :p? :owith a constant object returns:oand the subjects that reach it, each once (it returned every subject of:p, repeated), a subquery with an aggregate gives all its rows, and nested groups keep their rows.GRAPH ?g { ... },?gis bound only after the group, as SPARQL says: aFILTERon?g,?gused as a term, and a nestedGRAPH ?ginsideEXISTS,NOT EXISTS,OPTIONALorMINUSno longer see it bound early, which gave missing or extra rows.GRAPH <iri>over a graph the dataset does not hold gives no row (SPARQL: GRAPH <iri> { BIND(...) } returns a row when <iri> names no graph in the dataset #738),FROMover two graphs returns a shared triple once, andFROMwithoutFROM NAMEDexposes no named graphs. A variable repeated within one triple pattern holds the same term in each position (?x :r ?x,?g ?p ?ginsideGRAPH ?g, any pairing of subject, predicate, object and graph, also insideOPTIONAL); every matching triple was returned, andCOUNT(*)counted them all.<,<=,>and>=order false below true in every plan; they could return null and lose rows.<,<=,>and>=on two lists or two paths compare element by element in GQL and Cypher;[1] < [1]is false (it was null).||concatenates lists, and Cypher+appends or prepends a single value to a list, a null included ([1, 2] + 3,[1, 2] + null); both gave null before.+with a string in Cypher: a number and a string join in either order (1 + 'a'is'1a', written astoString()writes it; it was null).RETURN $p + 1 AS x, count(*),$m.k,$list[0],size($list)) no longer fails with an undefined variable.100 / n.age > 0, no longer fail on rows a label or an earlier condition rejects.ALTER GRAPH TYPE ... ADDis held like one listed byCREATE GRAPH TYPE, soDROP NODE TYPEandDROP EDGE TYPErefuse it while listed, andALTER GRAPH TYPE ... DROPtakes it out, in files written by 0.6.1 too.grafeo.min_cost_max_flowgives each parallel edge its own capacity and cost (two edges costing 1 and 5 reported 50 where 30 is right), and refuses a negative-cost cycle the source reaches (22023), where the call never returned.grafeo.kruskalandgrafeo.primtake the lightest of the edges between two nodes, in either direction, andgrafeo.primfrom a start node returns the whole tree; Kruskal kept the first edge it met and Prim missed a lighter edge pointing back, both reporting a heavier tree, and Prim followed only outgoing edges.grafeo.topological_sortgives the same order on every run (the lexicographically smallest by node id).CALL ... YIELD: a statement that starts with a procedure call goes on with any clause,MATCH,OPTIONAL MATCH,FILTER,LET,FOR,ORDER BY, anotherCALL,SETorINSERT, as ISO GQL allows (14.3); onlyRETURNwas accepted, and a followingMATCHwas a syntax error.NEXTthenCALL: a procedure call afterNEXTkept the earlier statement's columns, grouping the result by them; it now returns only its own columns, and the incoming fields stay in scope.SKIPandLIMITafter a GQLCALL:SKIP $nandLIMIT $nin theRETURNafter a procedure call take effect; they were ignored.HAVINGandFINISHafter a GQLCALLare accepted; they were a syntax error.CALL ... LIMIT $ntakes its limit; it was ignored.lpgandedgeprofiles, the CLI):CREATE PROCEDUREsucceeded there and itsCALLsaid the procedure was unknown.MATCH (n {k: NULL}), also on an edge, in GQL, Cypher and SQL/PGQ) finds nothing, as an equality with null does; it found the elements without the key. A null in aMERGEpattern still matches an absent property.DATETIMEliteral keeps its offset:DATETIME '2024-01-01T10:00:00+01:00'is a ZONED DATETIME at+01:00andZis+00:00, as theZONED DATETIME '...'deprecation names it; 0.6.1 gave the UTC time without the offset. Without an offset it stays a local datetime.EXPLAINreturns the plan; it ran the statement and returned its rows, in Python'sexplain_sqltoo.INTERSECTandEXCEPTinsideCALL { }: the columns they return are visible after the call, as withUNIONandOTHERWISE; reading them raised "Undefined variable".MERGEafter anOTHERWISEbody inCALL { }uses the node the body returns; it raised "Variable already declared outside the CALL subquery".YIELD: a column a procedure does not have is refused when the call is planned, naming its columns; it failed only after the algorithm had run (4.5 s on 4,000 nodes).Nextof a stream in Go); every native call now keeps its handle alive. In C#, an async call on a database disposed meanwhile throwsObjectDisposedException.importRdfis in every build with the RDF store, thefullpackage (@grafeo-db/wasm) included; it was missing there.kresults, or none, when the allowed nodes lay far from the query; it now searches among the allowed nodes.close()checkpoints only when something changed since the last checkpoint, so a database opened only for reads keeps its file byte for byte (its header was rewritten on every close).grafeo_backup_full,grafeo_backup_incremental,grafeo_restore_to_epochandgrafeo_clear_plan_cache, exported since earlier releases, are now declared ingrafeo.h.<file>.spill/query_*directories a crash left, with the vector cache, before it measures the spill volume.Security
LOAD CSV,LOAD DATA, the CSV load procedures and SPARQLLOADbefore any file is opened; through a server, give remote sessions none.Contributors
What's Changed
Full Changelog: v0.6.1...v0.6.2
This discussion was created from the release Release 0.6.2.
All reactions