Graphus v0.0.9
Version: 0.0.9
Date: 2026-07-08
Summary
Graphus v0.0.9 is a feature release for Graphus, the Label Property Graph (LPG) database
server written in Rust for extreme load and concurrency. It makes the server fit the hardware it
runs on out of the box and interoperate with strict or legacy Neo4j drivers, while keeping the
honest defaults, the conformance guarantees, and the drop-in upgrade path intact.
Two capabilities are added and one defect is fixed:
- Hardware-aware startup auto-tuning. At startup the server probes the host — logical CPUs,
physical and available RAM, and the store filesystem's capacity, free space, and an
SSD-versus-rotational hint — and sizes its resource-hungry parameters to the real hardware. The
buffer pool, previously a fixed 32 MiB regardless of RAM, now auto-sizes to roughly one eighth of
available RAM (clamped to a safe range); the reader and morsel pools resolve to the number of
cores, capped. Any value set in the TOML file or aGRAPHUS_*environment variable overrides the
auto-detection — operator configuration always wins. - Configurable Bolt
serveragent. Graphus keeps announcing the honest, fully conformant
Graphus/<version>in the BoltHELLOreply by default, but a new opt-in option lets operators
advertise a Neo4j-compatible agent string for strict or legacy drivers that verify it. This changes
only the advertised string; it never alters Bolt or PackStream behaviour. - Fixed a tiny buffer-pool re-entrancy abort. A pathologically small buffer pool could abort the
process with aRefCell already borrowedpanic during a re-entrant eviction. It now fails closed
with a clean, recoverable error, and an explicit sub-minimum pool size is rejected at startup.
This is a drop-in upgrade from v0.0.8: no public Cypher, Bolt, or REST
contract changed, the two new capabilities are opt-in and default to the previous behaviour, and no
existing configuration needs to change.
Throughout, the four inviolable guarantees held:
- 100% ACID — full transactional reliability under power loss, faults, and crashes.
- 100% openCypher TCK — 3914 / 3914 scenarios passing.
- 100% Bolt protocol — byte-for-byte interoperability with the Neo4j driver ecosystem.
- 100% PackStream — exact wire-level serialization.
Highlights
- The server fits its hardware automatically. On first start Graphus detects the host's CPUs,
RAM, and store filesystem, then sizes the buffer pool, reader pool, and morsel parallelism to what
it finds — instead of shipping a fixed 32 MiB buffer pool on every machine from a Raspberry Pi to a
many-core server. - Operator configuration always wins. Auto-tuning is driven by a
0 = autosentinel: any value
set in the TOML file or aGRAPHUS_*environment variable (including the new
GRAPHUS_BUFFER_POOL_PAGES) overrides the detected default verbatim. - Never worse than before. The auto-sized buffer pool floor equals the previous fixed default and
its ceiling bounds worst-case resident memory, so the change can only match or improve on prior
behaviour. - Interoperability with strict or legacy Neo4j drivers. A new opt-in startup option advertises a
vettedNeo4j/5.13.0(or any value you choose) in the BoltHELLOreply, so drivers and tooling
that verify theserveragent string accept Graphus — without changing Bolt or PackStream
behaviour. - Safety kept
#![forbid(unsafe_code)]. Hardware detection lives in a new, separately-audited
leaf crate,graphus-sysres, which isolates the single platform-specificunsafesystem call so
thegraphus-servercrate remains free ofunsafecode. Every probe degrades gracefully and never
panics or blocks startup. - A tiny buffer pool no longer aborts the process. A re-entrancy hazard that could panic under a
pathologically small pool now fails closed with a clean, recoverable error while preserving
write-ahead-log-before-data ordering.
Added
- Hardware-aware startup auto-tuning (rmp #617, decision
D-hw-autotune). At startup the server
probes the host — logical CPUs, physical/available RAM, and the store filesystem's capacity/free
space plus an SSD-vs-rotational hint — and sizes its resource parameters to the real hardware, while
any value set in the TOML file or aGRAPHUS_*environment variable overrides the auto-detection.
The buffer pool (previously a fixed 32 MiB regardless of RAM) auto-sizes to roughly one eighth of
available RAM, clamped to[32 MiB, 2 GiB]; the reader and morsel pools resolve tomin(cpus, 16).
Auto-tuning is driven by a0 = autosentinel (including the newGRAPHUS_BUFFER_POOL_PAGES), so
operator configuration always wins. The auto-size is computed by a pure, deterministic step
(apply_hardware_defaults) run before validation and before any store opens. Detection lives in a
new, separately-audited leaf crate,graphus-sysres, that isolates the single macOSunsafe
sysctlcall, keepinggraphus-server#![forbid(unsafe_code)]. A single structured startup log
line reports what was detected and how each parameter resolved (autovsconfig). See
docs/configuration.mdfor the full parameter table and the
auto-tuning rules. - Configurable Bolt
serveragent for legacy/strict Neo4j-driver interoperability
(bolt_server_agent/GRAPHUS_BOLT_SERVER_AGENT, rmp #614). By default Graphus keeps
announcingGraphus/<version>in the BoltHELLOSUCCESS— 100% Bolt-conformant and accepted by
every modern Neo4j driver. Some strict or legacy clients (1.x-era drivers and tooling derived from
them) instead verify this string and reject any product that is not the case-sensitive literal
Neo4j. The new opt-in startup option controls the advertised agent: unset or blank → the
Graphus/<version>default; theneo4j-compatshortcut → the vettedNeo4j/5.13.0; any other
value → announced verbatim (for exampleNeo4j/5.13.0-graphus-<version>).Neo4j/5.13.0is the
floor of the Neo4j version window whose native Bolt maximum matches Graphus's negotiated Bolt 5.4
(Bolt 5.4 ⇒ Neo4j 5.13–5.22, per the official compatibility matrix), so no version-keyed client
assumes Bolt features Graphus does not serve; a regression test couples this compatibility constant
to the handshake'sMAX_MINORso a future Bolt bump fails loudly. AnnouncingNeo4j/…does not
change Bolt/PackStream conformance nor unlock capabilities — drivers gate features on the negotiated
Bolt version, never on this string. A startup warning fires (warning only, never a rejection) when
the configured value claims Neo4j identity in a shape a strict or legacy parser would reject. See
docs/bolt.mdanddocs/configuration.md.
Fixed
- Tiny buffer-pool re-entrancy abort (rmp #302). Building a buffer pool with a pathologically
small capacity could abort the process with aRefCell already borrowedpanic during a re-entrant
eviction. This was root-caused (proven empirically) to the indexSharedWal::ensure_durable, which
performed a re-entrantborrow_mutwhen a caller held the WAL latch across an evicting page
write-back — the classic ARIES "don't nest the buffer-pool flush under the log latch" hazard. It now
fails closed with a clean, recoverable error instead of aborting, preserving
write-ahead-log-before-data ordering: the error short-circuits before the home write, so no page is
written home ahead of its log record and the page stays resident and dirty. As defence in depth,
an explicitbuffer_pool_pagesbelow the documented minimum (64) is now rejected at startup with a
clear message rather than reaching the pool, and an internal safety net ensures an unresolved config
can never reach store-open with a zero-page pool. Regression tests were added at pool sizes 1, 2, 3,
and 4 across the buffer-pool and index-recovery paths.
Verification
This release was validated empirically; no functional test reported an error. The four inviolable
guarantees are unchanged — the openCypher TCK remains at 3914 / 3914 (100%), and the ACID, Bolt,
and PackStream guarantees hold.
- Hardware-aware auto-tuning. The new
graphus-sysrescrate is covered by 9 unit tests and 2
documentation tests, and thegraphus-serverconfiguration layer adds a deterministic auto-tuning
battery (clamp arithmetic, floor and ceiling, override precedence, and idempotence) alongside
dedicated hardware-detection tests. It was verified end to end on the real binary in three modes:
auto-detection (a 2 GiB buffer pool selected on a 27 GiB host), an environment-variable override
(operator config wins over the detected default), and a sub-minimum value (a clean fail-fast error,
with no panic). Thegraphus-sysrescrate — which isolates the single platformunsafesysctl
call — received a clean security review (SECURE). - Configurable Bolt server agent. Unit tests cover the agent resolver (default, the
neo4j-compat
shortcut, and verbatim values), input normalization, and the warning heuristic (including
case-variant and truncated-version inputs). Core Bolt tests assert the custom agent is reflected in
theHELLOSUCCESSand that the compatibility constant is coupled to the handshake'sMAX_MINOR.
An end-to-end test drives a real Bolt client that readsNeo4j/5.13.0back from a live server's
HELLO. The change was certified GO by the Bolt-protocol specialist: noHELLO/PackStream
regression, a spec-legal value safe for the widest driver ecosystem, and a warning heuristic with
zero false positives. - Tiny buffer-pool re-entrancy fix. RED→GREEN regression tests were added at buffer-pool sizes 1,
2, 3, and 4 across the buffer-pool and index-recovery paths, asserting a clean recoverable error in
place of the former abort. - Conformance and hygiene gates intact. The broader suites remained green — including the
graphus-serverlibrary, server integration, buffer pool, index, and storage tests — and
clippy --all-targets -D warningsis clean on every touched crate. The openCypher TCK stays at
3914 / 3914.
Compatibility
v0.0.9 is a drop-in upgrade from v0.0.8. The transaction and isolation model is exactly as in
v0.0.8 (MySQL-style autocommit reads at Snapshot Isolation, fully Serializable
writes and explicit BEGIN … COMMIT transactions; see
docs/transactions.md), and no public Cypher, Bolt, or REST contract
changed.
Both new capabilities are opt-in and default to the previous behaviour:
- Auto-tuning activates only where a parameter is left at its
0 = autosentinel. Any value
already set in the TOML file or aGRAPHUS_*environment variable is honoured verbatim, so an
existing configuration behaves exactly as before. The auto-sized buffer pool floor equals the old
fixed default, so an unconfigured server can only match or improve on its previous memory footprint. - The Bolt
serveragent staysGraphus/<version>unless you explicitly setbolt_server_agent
(orGRAPHUS_BOLT_SERVER_AGENT). Setting it changes only the advertised agent string and never the
Bolt or PackStream wire behaviour.
No action is required to upgrade. Operators who want the server to size itself to the host can
simply leave the relevant parameters unset; operators who need strict-driver compatibility can set
bolt_server_agent = "neo4j-compat".
Upgrading
# Docker Hub (multi-arch: linux/amd64 + linux/arm64)
docker pull flaviocfo/graphus:v0.0.9 # or :latestSee docs/getting-started.md for first-run instructions,
docs/configuration.md for the full configuration reference — including
hardware-aware auto-tuning and the bolt_server_agent option — and docs/bolt.md
for the Bolt-over-TCP and Bolt-over-UDS interfaces and Neo4j-driver interoperability.