Skip to content

v2.6.0

Latest

Choose a tag to compare

@github-actions github-actions released this 23 Nov 21:17
· 5 commits to main since this release

HexDB 2.6.0 makes backups cover the whole lattice from any hex, makes the first administrator's password work for one sign-in only, and lays the groundwork for partitioned writes with a partition map whose epochs forwarded requests carry (every lattice is still one partition, so nothing behaves differently). Downloads through a sliced replica now stream, queue counts no longer compete with receives, and chrono and the RSA advisory are gone from the dependencies. Benchmarks can compare two versions across a lattice and queue scenarios, every release attaches scan reports for each image, and the Intel macOS build is much faster.

Partitioning (preview)

  • The partition map. Partitioned writes will split the 64 slices among groups of hexes, each with its own Overseer (see design/partitioning.md). 2.6 adds the map: which partition owns each slice and which hexes form each group, with an epoch that grows with every change. A lattice that never changed it has the implicit map (partition 0, every slice, epoch 1), so upgrading writes nothing. GET /status/partitions (administrators) shows the map a hex routes by.
  • Epochs on forwarded requests. With [partitioning] enabled = true (off by default), a hex that forwards a request also sends the epoch it routed by, covered by the lattice signature, once every live hex runs 2.6 or later. A hex with another epoch refuses the request before running it (421 partition_epoch), and the forwarding hex reloads its map and sends it again.

Backups

  • A backup outlives its request. POST /backup used to stop holding off flushes and compaction if the request timed out while the copy carried on, so the copy could pick up files changing under it. The backup now runs as a task of its own: it finishes with flushes and compaction held off, a second backup waits for it, and both a finished and a failed backup are audited (maintenance.backup, outcome failed with the error).
  • Lattice backups from any hex. POST /backup now backs up the whole lattice by default. It runs on a hex that holds all of it (an Overseer that isn't rebuilding, or a replica that keeps every slice and is caught up) and only when every chunk of file content its documents reference is there. Sent to a sliced or lagging replica, through a load balancer say, it's passed to the Overseer. POST /backup?scope=hex (hexdb backup --hex) still backs up just what one hex holds. The answer and the manifest record scope, role, slices, missing_file_chunks and complete, and the admin UI and CLI flag a partial backup. File garbage collection now waits for the whole backup, and a backup request is no longer cut off by the request timeout.

Dependencies

  • chrono to jiff. HexDB's own code no longer uses chrono, which is unmaintained (RUSTSEC-2026-0543). Timestamps keep exactly the same formats on disk, between hexes and in the API, and SQL date functions and schedules give the same results. The new code was checked against chrono on several hundred thousand generated dates and schedules. chrono is gone entirely: the EXIF and video metadata reader (nom-exif) is now a patched copy in vendor/nom-exif that uses jiff, and its output is unchanged (checked against the original on the same files). Only edge cases differ: dates past the year 9999 are refused, and a leap second (:60) counts as the next second.

  • YARA-X 1.24 and rsa 0.10.0. The malware scanner now builds with the patched rsa release, so the exception for RUSTSEC-2023-0071 (Marvin) is gone. YARA-X only verified signatures with it, which the advisory never affected.

  • cookie 0.18.3 and url 2.5.9 fix two advisories published while 2.6.0 was being finished: repeated private-cookie nonces in processes that fork (RUSTSEC-2026-0594) and a stack overflow on nested blob: URLs (RUSTSEC-2026-0592).

Files

  • Downloads through a sliced replica stream. A file fetched by path from a replica that keeps only some slices used to be read whole from the Overseer before the first byte went out. It now streams through, ranges included, with its length.

  • Quotas hold under concurrent uploads. An upload finishing exactly while another was checked could be counted neither as reserved nor as stored, so the other could go past a user's or a tessellation's quota. Checks now read the reserved room before the stored usage, and a recount that an upload finished during isn't kept.

Benchmarks

  • Comparing versions. cargo run --release -p hexdb_bench -- compare <A hexdb_api> <B hexdb_api> [rounds] runs both versions on one machine in alternating rounds. It reports p50/p95/p99 latencies, throughput with its range across rounds, and the server's memory. Both modes now stop at an answer with an unexpected status, instead of timing an error as work.
  • Scenarios. compare also runs a three-hex lattice with writes acknowledged by two replicas, alone and while files download from the Overseer and through a sliced replica (first-byte latency, MB/s, every byte checked, the replica's peak memory), and a queue drained with and without a dashboard polling its counts. Errors are counted and reported; any error makes the comparison invalid. --only single,lattice,queues picks scenarios.

Queues

  • Counts don't compete with receives. GET /queues/<name> answers its last counts again when nothing in the queue changed within the last second, and while the queue is busy (its index held for long) it answers counts up to a minute old instead of reading every message. Answers carry as_of.

Sign-in

  • Passwords that work once. The first administrator's password, generated or configured, now works for one sign-in, which must choose a new password. The sign-in page asks for it; POST /auth/login answers 403 password_change_required until the request carries "new_password". A password that passed through a configuration file, a secret store, a console or a hosting dashboard stops working as soon as it's used. Administrators can give any user such a temporary password (the Users page, or "password_change_required": true), and hexdb reset-password prints one. It works on replicas too: the new password goes to the Overseer over the lattice's signed connection. Automation that signs in with the configured password repeatedly can set security.change_first_password = false.

Kubernetes

  • The first administrator's password stays out of the logs. The Helm chart generates it into its Secret (admin-password, kept on upgrades) unless admin.password is set, so HexDB no longer generates one and prints it to the pod's log. Read it with kubectl get secret <release>-hexdb -o jsonpath='{.data.admin-password}' | base64 -d. With existingSecret, the password is now read from that Secret's admin-password key; earlier charts ignored it unless admin.password was also set. A lattice installed with an earlier chart keeps the administrator it has.

Releases and images

  • Intel macOS binaries are cross-compiled on Apple Silicon. The Intel build had taken 40 of a release's 50 minutes.
  • Scan reports for every image. Each release now attaches four full Trivy reports to its GitHub release, one per image (full and slim) and architecture (trivy-full-amd64.json and so on), as evidence for the exact images; before, only the full amd64 image's report was kept, as a run artifact.
  • Image findings from the 2.5.9 scan are triaged in packaging/trivy-triage.md: libacl1, plus TLS libraries, glibc's iconv and OpenJPEG at unknown severity. None is reachable from HexDB, and Debian has no fixes yet.

Upgrading

A new lattice's first administrator must choose a new password at the first sign-in (security.change_first_password); existing lattices keep their administrators as they are. Scripts that set up a fresh lattice and sign in with security.admin_password either send new_password once or set change_first_password = false.

Restart the hexes one at a time, as usual: replicas first, the Overseer last. Leave partitioning.enabled off until every hex runs 2.6.

Full Changelog: v2.5.9...v2.6.0