Repository navigation
v3.0.13
Changed
-
Breaking: Cypher, GQL, Gremlin and SQL/PGQ run on Grafeo 0.5.44
(was 0.5.42). Some statement results change:- An unaliased column is named after its expression as written:
RETURN count(n)returns a columncount(n), notcountnonnull(...). - Statements that returned wrong rows now fail with an error: two columns
with the same name (RETURN 1 AS a, 2 AS a; give one another alias),
an unnamed expression inWITH, andUNIONmixed withUNION ALL. A
parameter that was not supplied fails withMissing parameter: $name
instead of an internal error. ORDER BYuses the openCypher order across value types (strings before
numbers), and GQLNULLS FIRST/NULLS LASTare no longer reversed
withDESC.- Cypher
=~must match the whole string:'abc' =~ 'b'is false. - A variable-length relationship variable holds the list of the path's
relationships (size(rs)was null). MERGEbinds every matching node, one row each, instead of the first.keys(r)of a relationship lists its keys (was null).EXISTS { ... }over a multi-hop pattern runs (was an internal error).- Computed property values in
CREATE(CREATE (:Item {n: r[0]})) now
work; they used to be refused asunsupported. - One form that worked is now refused: a
WITH ... WHEREthat reads a
variable theWITHdoes not project, such as the anti-join
OPTIONAL MATCH (a)-[r]->(c) WITH c WHERE r IS NULL. Write
WITH c, r WHERE r IS NULL.
The openCypher TCK now passes 1,653 of 3,897 scenarios (was 1,385); of
the 2,403 in the supported profile, 1,653 pass (was 1,385 of 2,431). - An unaliased column is named after its expression as written:
-
Commits are published once their write-ahead log record is durable.
Before, a commit became visible only after it was also written into the
store file, one group at a time, so every tenant's write waited for the
whole store-file write of any large commit ahead of it, such as a merge
import (one commit per request since 3.0.11). That write now happens on
a background thread per store file; reads include the commits it has not
written yet, with the same answers at every snapshot. The backlog is
bounded at a quarter of the managed budget, at most 256 MiB; at the bound
commits wait for it. 50 light tenants writing single records beside a
200,000-record merge import, same host, before → after: requests of
5,000 documents: light p99 387–475 → 275–283 ms, import 3,619–3,729 →
3,022–3,630 records/s; requests of 1,000 documents: light p99 397–405 →
169–192 ms, import 3,027–3,279 → 3,490–3,503 records/s. The same import
alone: 45.7–46.1 → 44.5–44.9 s. A commit of 16,384 keys or more, such as
a large import request, enters that backlog as one sorted run instead of
key by key, with a filter of its key prefixes, so an index lookup that
finds nothing in the run skips it without a search. Against 3.0.12: a
1,000,000-row CSV import 22.0–22.9k → 23.0–23.6k rows/s, nested JSON
documents in requests of 5,000 4.4–4.6k → 5.5k documents/s and of 500
3.5–3.6k → 4.9–5.0k documents/s. The advice to send merge imports of
about 1,000 records on shared hosts is withdrawn. Writes that go to the
store file directly instead of through that backlog wait for it to drain
first, so a backlogged commit is never written over them: the sweep of
expired retry receipts, the receipt of an aborted commit, and the WAL
replay of a point-in-time restore. Metrics: the
writer-hold labelpublishis nowmaterialize; new
rushdb_storage_unmaterialized_bytesand commit phasegap_push;
backend_applynow times the background writes. -
Faster unfiltered ANN vector search. The label-membership check of an
unfilteredquery.vector(and the vector leg ofquery.hybrid) now runs
on the reranked hits in rank order untillimit + offsetpass, instead
of on every gathered candidate, and a hit's record is read once. Responses
are byte-identical. 100,000 × 1,536-d cosine vectors, top 10: server time
1.54 → 1.37 ms atef128 and 0.93 → 0.86 ms atef64. -
Exact vector search twice as fast once a space is resident. A
space's resident vectors (vector-cache-bytes) now also hold its ready
bindings and each vector's norm, so an exact search without a predicate
(or with one matching more records than the space holds vectors) scores
them in one parallel pass instead of first reading every binding from
storage on one thread, and cosine scoring computes one sum per vector
instead of two. Scores and order are bit-identical. 100,000 × 1,536-d
cosine vectors, exact top 10: server time 24.1 → 11.7 ms. The resident
form of a space grows by 48 bytes per vector (under 1% at 1,536-d). -
Filtered vector searches pick exact or ANN by cost.
resources.vector-exact-max-poolnow defaults toauto: a filtered
search is scored exactly whilepool² × dimensions ≤ 26,000 × ef × index vectors(the walk slows down as the filter admits less of the index), an
unfiltered one whileindex vectors × dimensions ≤ 144,000 × ef, instead
of a fixed 5,000 at any size. 100,000 × 1,536-d, a filter matching 10%,
mode: ann,ef512: 18.7 → 4.4 ms (now exact, recall 1.0); a filter
matching 50% stays on the graph. A number still fixes the pool, and the
new formfixed:<number>does too.
Behaviour change for existing data directories: everyconfig.yml
written before 3.0.13 holdsvector-exact-max-pool: 5000, which now
reads asauto. If you set 5,000 on purpose, write
vector-exact-max-pool: fixed:5000(or--vector-exact-max-pool fixed:5000,RUSHDB_VECTOR_EXACT_MAX_POOL=fixed:5000) to keep it. New
data directories are written withauto. -
Repeated schema reads are answered from memory. An unfiltered
describe.propertiesanswer (and the property part ofdescribe.schema)
is kept in a resident layer (describe, a share of
logical-cache-bytes) until a write reaches what it reads: the described
labels' records and property rows, a property they hold, or the property
definitions. Writes to other labels' own properties and to other tenants
keep it; a policy still narrows and masks every answer. Answers are
byte-identical. 10,000 nested documents (4 labels):describe.properties
server time 3.1 → 0.2 ms; onedescribe.schemaplus one
describe.propertiesper label, client side: 11.8 → 1.5–2.0 ms.
Fixed
rushdbworks right after the one-line installer, in the same shell.
curl -fsSL .../install.sh | sh && rushdb upfailed withcommand not found: the binary goes to~/.rushdb/bin, and thePATHline added to
the shell startup file only reaches new shells. The installer now also
linksrushdbinto the first of~/.local/bin,~/bin,
/opt/homebrew/binand/usr/local/binthat is already onPATHand
writable by the user (never withsudo), and says so. It replaces only its
own link there, never anotherrushdb.--no-modify-pathlinks nothing;
--dir/RUSHDB_INSTALL_DIRis the link's target.rushdb upno longer keeps its data beside the installed binary.
install.shinstalls into~/.rushdb/bin, andrushdb updefaults to
./.rushdb, so started from the home directory it put the store in
~/.rushdbitself: deleting that data directory deleted the binary. When
./.rushdbholds the running binary, the default is now./.rushdb/data.
A store already in~/.rushdbkeeps opening there, with a one-line notice
on how to move it; nothing is moved. An explicit--data-diror
RUSHDB_DATA_DIRis unchanged.- No more half-second write stall after a large load. Commits are
applied to the store file without a sync and made durable by periodic
checkpoints; the first durable commit after a load (a checkpoint, or the
history-GC batch that completes a sweep) wrote out and synced the whole
load while it held the file's only writer, so the next commit of every
tenant waited for it. A store file whose unsynced writes pass 16 MiB is
now checkpointed right away by the thread that writes commits into it,
so no durable commit carries more than that. 50,000 nested documents, then 400 single-record
writes (two runs each, btrfs): longest writer hold above 1 s → under
0.5 s, slowest write after the load 188–319 → 92–105 ms. New metric
rushdb_storage_paced_checkpoints_total.