RushDB 3.0.17: renames, required properties and bulk writes that finish
RushDB 3.0.17 renames and requires properties on a label in one commit, runs label-wide UPDATEs that finish under concurrent writes, and counts distinct values on the server.
Contents
RushDB 3.0.17 is a release for changing data you already have. You can rename a property on one label, require it with a default, and drop it, each in one commit and from SQL too. A label-wide UPDATE or MongoDB updateMany now finishes while other clients keep writing, and its answer is a count instead of every changed row. Distinct counts run on the server. The command format changes, so take a backup before you upgrade.
Highlights
renamePropertyand SQLALTER TABLE ... RENAME COLUMNrename a property on one label's records in one commit. Its indexes follow without a rebuild.requirePropertyand SQLNOT NULL/DEFAULTrequire a property on a label. Existing records without it get the default in the same commit, and every later write is checked at commit.deletePropertywithlabeland SQLDROP COLUMNremove a property from one label only.- A statement that loses its commit to concurrent writes runs again while holding the tenant's other writes for at most 10 seconds, so a long
UPDATEno longer fails forever on a busy label. - SQL DML answers with the number of rows it changed and is bounded by
query-memory-max, not by the response size limit. $countwith$distinctcounts distinct values on the server, and an unfiltered count is answered from the value dictionary without reading a record.linkRecordsPairsresolves each endpoint once, which makes bulk relationship loads about 8% faster.- SQL
UPDATEon a property holding values of more than one type now writes every row it reports.
Rename a property on one label
A property name belongs to the whole database, but a rename usually concerns one label. renameProperty moves every value of from to to on the records of label:
{ "kind": "renameProperty", "label": "Member", "from": "city", "to": "town" }The same in SQL, over HTTP or the PostgreSQL wire:
ALTER TABLE "Member" RENAME COLUMN "city" TO "town";Each value keeps its type. The label's ordered, unique and full-text indexes on city answer for town from the same commit, under the same names, with no rebuild. Other labels keep city. The answer's affected is the number of records renamed. The rename is refused with conflict if a record of the label already has town, and with not_found if none has city.
On a label of one million records, the rename took 19 s on one workstation. Before 3.0.17 the only way was to copy the values with an UPDATE and delete the old property, and on a label that size the copy was refused for the size of its answer.
Require a property, with a default
requireProperty requires a non-null value on every record of a label. In the same commit, every existing record without one gets the default:
{ "kind": "requireProperty", "label": "Member", "property": "tier", "default": "basic" }ALTER TABLE "Member" ADD COLUMN "tier" TEXT NOT NULL DEFAULT 'basic';
ALTER TABLE "Member" ALTER COLUMN "tier" SET DEFAULT 'gold';
ALTER TABLE "Member" ALTER COLUMN "tier" DROP NOT NULL;From then on, a record of the label created without the property gets the default on every create path: native writes, ingest, SQL INSERT, MongoDB, the graph languages and transactions. A write that would leave a record without a value is refused with conflict, naming the record, the label and the property. That covers an explicit null, an update that removes the property, and retyping a record into the label. The rule is checked in the commit itself, where unique indexes are, so no write path skips it. Without a default, requireProperty is refused if a record of the label lacks the property, as SQL SET NOT NULL is on a column holding nulls.
Adding a required property with a default to one million records took 12 s on the same workstation. Filling the property with updateMany alone took 21 s, without a rule to keep it filled.
dropRequiredProperty removes the rule, and deleteProperty with label (SQL ALTER TABLE ... DROP COLUMN) removes the property and its rule from that label's records only:
{ "kind": "deleteProperty", "name": "legacyScore", "label": "Member" }Bulk writes that finish while others write
RushDB commits are serializable: a statement that read data another commit changed before it finished is refused, and nothing it wrote is kept. That's right for a short write, which retries and succeeds. A statement that reads a whole label, such as UPDATE "Member" SET ... or updateMany with an empty filter, could be refused on every retry while small writes kept landing on the label.
In 3.0.17, a SQL or MongoDB statement refused this way runs again while holding the tenant's other writes. The re-run can't be invalidated, so it finishes. Other writers of the tenant wait for it for at most held-commits-wait-ms (10 seconds by default, RUSHDB_HELD_COMMITS_WAIT_MS). After that they get a retryable resource_exhausted error, and nothing of theirs is written. Other tenants aren't affected.
In a test with one million records and a client writing a record every 20 ms, updateMany over the whole label finished in 52 s on its first attempt. On 3.0.16 it was refused five times out of five.
MongoDB updateMany now applies to every matching document, bounded by query-memory-max instead of a fixed cap. It also gains $rename.
SQL DML answers with a count
A SQL INSERT, UPDATE or DELETE answers with the number of rows it changed:
{ "kind": "statementMutation", "rows": [{ "count": 1000000 }], "affected": 1000000, "commitIndex": 53 }Its write set is charged to query-memory-max. A statement too large for it fails with a memory-limit error and writes nothing. Before 3.0.17, a DML statement was bounded by the response size limit, so an UPDATE ... SET x = CAST(x AS VARCHAR) over one million records was refused. In 3.0.17 it takes 14 s, and the answer is 158 bytes.
3.0.17 also fixes a SQL UPDATE bug that dates back to 3.0.0. A column holding values of more than one type reads as text, so a stored integer looked equal to the text CAST made of it, and the row was counted but not written. Converting a property in key ranges therefore converted only the first range. 3.0.17 compares a value that looks unchanged with the stored one, and writes it if they differ.
Distinct counts on the server
$count takes $distinct:
{
"labels": ["Member"],
"select": { "cities": { "$count": "$record.city", "$distinct": true } }
}It counts each value once and skips nulls. With an alias ("$count": "$team", "$distinct": true) it counts each related record once per group. The count is charged to query-memory-max. Without a filter or groupBy on one label, it's read from the value dictionary without reading a record. SQL COUNT(DISTINCT x) already ran on the server.
Upgrading
3.0.17 writes commands in format 3. A WAL or base backup written by 3.0.17 is refused by 3.0.16. Take a base backup before you upgrade. Rolling back means restoring that backup with 3.0.16. The store format doesn't change, and nothing is rewritten at the first start.
The container image now names its user (65532, the same non-root user as before), so existing data volumes keep working. The release build checks the Rust installer it downloads, and the publish workflows pass only the secrets each step needs.
3.0.17 is available as rushdb/rushdb:3.0.17 on Docker Hub and GHCR, from the install script, as a Homebrew formula and as a Helm chart. Like 3.0.14 to 3.0.16, it isn't published to crates.io: it is built with a Grafeo revision that isn't released yet.
The full list is in the 3.0.17 changelog, and the writing data and SQL pages of the manual cover the new operations.
Sources
RushDB
Precision your agents can query.
RushDB is a self-describing, graph-native database that helps AI agents reason over data with confidence: progressively introspect what's queryable—without guesswork.
Start free →