Skip to content

v3.0.17

Latest

Choose a tag to compare

@github-actions github-actions released this 06 Dec 01:08
f6ee456

A release for label-wide writes and schema changes: bulk statements that
finish under concurrent writes, property renames, required properties with
defaults, and distinct counts.

Changed

  • Breaking: the command format is version 3. 3.0.17 writes every commit
    in command format 3 (it adds the commands of the label schema changes
    below). Logs in formats 1 and 2 are still read, so a store written by any
    3.x release starts on 3.0.17. A WAL written by 3.0.17, and a base backup
    taken by it, are refused by 3.0.16: take a base backup before upgrading if
    you may need to roll back, and roll back by restoring it with 3.0.16.
    Followers must run 3.0.17 before their leader does.
  • Breaking: a DML statement is no longer bounded by the response size
    limit.
    An UPDATE, DELETE or INSERT without RETURNING answers with
    its count only, on every route (HTTP, gRPC, the PostgreSQL wire, Cypher and
    GQL SET, MongoDB updateMany). SQL charged the writes a statement plans
    to the request's response budget (the body limit, 16 MiB by default), so
    an UPDATE of every record of a label of about a million records failed
    with response would exceed the response size limit although it returns
    one row. The planned writes are now charged to query-memory-max (the
    statement's working set, query working set exceeded), and a graph
    language mutation stages up to its own 64 MiB whatever the body limit. The
    Rust API execute_sql_mutation_in_view_with_budget is now
    execute_sql_mutation_in_view, without the budget.
  • A long statement finishes while small writes keep committing. A SQL
    or MongoDB statement outside a transaction that loses its commit to a
    concurrent write to what it read is run once more by the server, at a
    fresh snapshot with the tenant's other commits waiting until it commits
    (other tenants keep committing). An updateMany or label-wide UPDATE
    under a steady trickle of single-record writes to the same label used to
    fail with write_conflict on every attempt, however often the client
    retried. The first attempt stays optimistic, so uncontended statements
    never make other writers wait, and the statement is still applied whole,
    at one snapshot, or not at all. A statement inside a transaction keeps
    first-committer-wins. While the re-run holds the tenant, another write to
    it waits at most held-commits-wait-ms (new; default 10,000 ms, 0 = no
    limit; --held-commits-wait-ms, RUSHDB_HELD_COMMITS_WAIT_MS,
    resources.held-commits-wait-ms) and then fails with a retryable
    resource_exhausted, nothing written; the re-run itself is not cut short.
    Transaction commits now wait for a held tenant too.
  • A MongoDB updateMany conflicts only with writes to what it read: the
    records it matched and the label and index ranges its filter scanned, as
    SQL DML does since 3.0.16. It used to be refused by any write to the
    tenant.
  • linkRecordsPairs resolves each endpoint once. The endpoints it
    resolves and checks before the commit are staged as they are; the commit
    only checks that each endpoint's record header still exists (once per
    record and batch), instead of resolving every id again under the tenant's
    lock. A pair whose endpoint was deleted, or deleted and created again
    under its id, after it was resolved fails the call, as before.
  • A MongoDB update or delete applies to every record it matches. It used
    to apply to the first 1,000,000 only, silently. Its matching is bounded by
    query-memory-max like any read (resource_exhausted past it).

Added

  • Rename a property of one label, in one commit: SQL ALTER TABLE "L" RENAME COLUMN a TO b and the native mutate.renameProperty (label,
    from, to). Each value keeps its type, the label's ordered, unique and
    full-text indexes on the property answer for the new name from the same
    commit without a rebuild, and a required rule moves with it. Other labels
    keep the old name. A MongoDB $rename in updateMany renames per matched
    document.
  • Remove a property from one label: mutate.deleteProperty takes an
    optional label, and SQL ALTER TABLE "L" DROP COLUMN [IF EXISTS] a does
    the same. Without label, deleteProperty stays tenant-wide.
  • Required properties with defaults: SQL ALTER TABLE "L" ADD COLUMN x <type> NOT NULL [DEFAULT v], ALTER COLUMN x SET NOT NULL, SET DEFAULT,
    DROP DEFAULT and DROP NOT NULL, and the native
    mutate.requireProperty (label, property, optional default) and
    mutate.dropRequiredProperty. Declaring one gives the default to every
    existing record without a value, in the same commit (without a default,
    it is refused while a record lacks a value). Afterwards a record created
    without the property gets the default on every write path, and a write
    that leaves a record of the label without a non-null value is refused with
    conflict (required property conflict), checked in the commit like a
    unique index.
  • Distinct counts in the native query: {"$count": "$record.city", "$distinct": true} counts each value once (nulls not at all), and
    {"$count": "$alias", "$distinct": true} each related record once per
    group, server-side and charged to query-memory-max. Without a filter
    or groupBy on one label, a property's distinct count is read from the
    value dictionary, without reading a record. SQL COUNT(DISTINCT x)
    already ran on the server.

Fixed

  • SQL UPDATE writes values a mixed-type column shows as text. A
    column holding values of more than one type reads as text, so a stored
    integer looked equal to the text CAST(x AS VARCHAR) made of it and the
    row was counted but not written. Converting a label's property in key
    ranges left every range after the first unconverted. A value that looks
    unchanged is now compared with the stored one.

Security

  • The image names its user. The Dockerfile sets USER 65532:65532, the
    distroless nonroot user the image already ran as, so data volumes
    created by earlier 3.x images keep working.
  • Release builds check the Rust installer. The Linux release build
    downloads a pinned rustup-init and checks its SHA-256 before running
    it, instead of piping sh.rustup.rs into a shell.
  • Workflows pass named secrets. The Docker Hub description workflow
    receives only DOCKER_HUB_PASSWORD from the publish workflow, not every
    repository secret.
  • Smaller build context. .dockerignore leaves out .env files and
    *.pem / *.key files, Dependabot waits 7 days before proposing a newly
    published version, and the upgrade-check scripts copy symbolic links as
    links.