Skip to content

v0.9.0

Latest

Choose a tag to compare

@github-actions github-actions released this 30 Nov 20:29
· 43 commits to 9637ff1f8cd2d3b12785a4663e552786fb7cc87a since this release

User, shared, stream, and persisted system tables go through one table provider, one versioned codec, and one primary-key index. A non-empty transaction that stays inside one Raft group is prepared once and written in one storage batch. File cleanup and notifications run after that write is durable.

This build moves Raft to OpenRaft 0.10.1. Restart the whole cluster together. Stop every node, install this build on every node, then start them. A node still on OpenRaft 0.9 and a node on OpenRaft 0.10 cannot share a Raft group: the RPC protocol version is rejected before the payload is decoded. Persisted Raft logs, votes, membership, and snapshot headers from the previous store are read by the new binary. See Raft replication.

Startup also rejects the old per-system RocksDB column families and the legacy shared-hot layout. Use an empty data directory, or export and import into a fresh database. Startup does not delete the old directory.

Docker latest tags advance only when the published release is stable.

Tables and transactions

  • KalamTableProvider hides the concrete user, shared, stream, and system providers.
  • One non-empty single-group transaction becomes a PreparedCommitBatch and one StorageBackend::batch. Validation finishes before the write.
  • File deletes are collected as post-commit work and run only after the batch is durable.
  • Coalesced commits flush the Raft WAL once per group. An fsynced insert stays durable without a separate sync for every row.
  • A transaction that needs a second Raft group is still rejected. Distributed two-phase commit is not in this release.
  • system.cluster_groups.committed is the cluster commit index. Pre-Vote is enabled. Leadership transfer uses the native OpenRaft call.

SQL and storage

  • Hot scans filter rows before they are materialized as Arrow.
  • A primary-key lookup loads the row once and reuses it. Repeated lookups are batched.
  • PostgreSQL wire INSERTs are batched. Transaction DELETEs stay point lookups inside the open transaction.
  • Versioned mutations and stream scans are paged. Indexed deletes and lookups are batched. The Raft log tail is a prefix seek.
  • A stream range scan applies delete visibility and timestamp bounds before LIMIT.
  • PostgreSQL wire scans reuse one Arrow IPC stream across batches. Repeated wire reads reuse the parsed layout and the open transaction, and unnamed portals stay off the portal map.
  • Memory streams are sharded. Raft apply buffers are isolated from catalog scans.
  • The RocksDB write batch keeps borrowed keys in one buffer instead of allocating a map and a key string per operation.
  • Schema publication is atomic. System scans report failures instead of stopping at an implicit 100,000-row cap.
  • Startup spends less time between process start and the first authenticated query. On an Apple M5 Pro, an empty restart reached /health in about 32 ms and the first query in about 36 ms. A restart of 1,000 tables and 2,009 column families was still about 1.4–2.0 s, most of it column-family open plus schema load.

Runtime defaults

  • mimalloc is the default allocator. Release archives still pass embedded-ui,traceability,mimalloc,cloud-aws explicitly.
  • The HTTP tracing logger is installed only when OTLP export is enabled, so a request does not allocate a trace id when tracing is off.
  • When workers is unset, the server uses the host CPU count, capped at 16.
  • The default Raft snapshot policy is LogsSinceLast(50000).

Query engine

  • The query engine is DataFusion 56.0.0. Arrow and Parquet are 60.2.0. JSON operators stay on the vendored datafusion-functions-json until crates.io publishes a DataFusion 56 build.

Security

  • Localhost-only routes accept a direct loopback connection that carries no forwarding headers. A forwarded address cannot grant that access, including when the TCP peer itself is loopback.
  • Session tokens are signed with jsonwebtoken 12.
  • Dependency upgrades pick up the RustSec fixes this tree can take, including Arrow and Parquet 60.2.0 and curve25519-dalek 5.1.0. Three findings stay open because their parent crates have no compatible upgrade yet: h2 0.3 via actix-http (RUSTSEC-2026-0258), rsa 0.9 via openidconnect (RUSTSEC-2023-0071), and cookie 0.16 via actix-web (RUSTSEC-2026-0594). Password login uses bcrypt. The server does not compile or use cookie's private jar.

Internal suite since 0.6.0-rc.0

Same host, Apple M5 Pro, 15 cores, 24 GB RAM, macOS. Standard suite: 38 benches, 100 iterations, 5 warmup iterations, concurrency 10. The 0.6.0-rc.0 run is bench-2026-08-23-215856-0-6-0-rc-0 (2026-08-23 21:58 UTC). The 0.9.0 run is bench-2026-11-20-214433-0-9-0 (2026-11-20 21:44 UTC), on the release binary built 2026-11-20 20:43 UTC. Both runs passed 38/38. That binary predates the grouped WAL flushes and the DataFusion 56 upgrade in this branch.

0.6.0-rc.0 0.9.0
Wall time 287.81 s 199.08 s
Measured time 220.39 s 179.69 s

Wall time is 31% lower. Most repeated means are faster. These are the means a reader is likely to compare:

Bench 0.6.0-rc.0 0.9.0 Change
Single-row INSERT 209 µs 115 µs 45% faster
Primary-key lookup 275 µs 66 µs 76% faster
Filtered SELECT 367 µs 91 µs 75% faster
Single-row DELETE 1.01 ms 194 µs 81% faster
Bulk DELETE 51.7 ms 4.69 ms 91% faster
Aggregate query 21.3 ms 2.84 ms 87% faster
1,000 concurrent SELECTs 112 ms 31.6 ms 72% faster
Reconnect and resubscribe 10.2 ms 890 µs 91% faster
DROP TABLE 259 ms 27.5 ms 89% faster
CREATE TABLE 324 µs 27.8 ms 86× slower
ALTER TABLE 953 µs 1.48 ms 55% slower

CREATE TABLE and ALTER TABLE are slower than the 0.6.0-rc.0 run and slower than the 0.8 internal runs. The flushed 200,000-row Parquet mix is almost unchanged (99.7 ms → 98.7 ms). The 100,000-subscriber live-query scale pass is 4% slower (2.85 s → 2.98 s). Twenty-six of the 38 means improved by more than 3% against the later 19:30 UTC v0.9.0 run on the same day; five were slower, including an explicit 50-row transaction (651 µs → 846 µs).

OLTP comparison since the 0.8.1 run

Same host and the same protocol: 100,000 single-row inserts, 10,000 timed inserts, 1,000,000 primary-key reads, 16 concurrent Rust clients, one call per row. The last 0.8 comparison is the 2026-11-15 two-pass mean of KalamDB v0.8.1. The 0.9 numbers are the 2026-11-20 21:13 UTC single pass, from the same build as the internal suite, before grouped WAL flushes and DataFusion 56. The peer engines in that pass were measured earlier the same evening and were not rerun. Memory was not sampled on 2026-11-15.

KalamDB SQL v0.8.1 (Nov 15, two-pass mean) v0.9.0 (Nov 20, one pass)
100,000 inserts 3.81 s (26,247/s) 2.259 s (44,269/s)
Insert p50 / p95 424 µs / 612 µs 306 µs / 466 µs
1,000,000 point reads 14.01 s (71,378/s) 10.630 s (94,072/s)
Read p50 / p95 196 µs / 286 µs 138 µs / 204 µs
Peak physical footprint not recorded 136.8 MiB

Inserts are 41% faster (1.69×). Point reads are 24% faster (1.32×). The function track on the same two runs went from 4.78 s to 3.249 s for 100,000 inserts (32% faster) and from 43.15 s to 25.837 s for 1,000,000 reads (40% faster).

The 0.9 comparison server used 8 workers, compact RocksDB budgets, mimalloc, and LogsSinceLast(50000). The 0.8.1 run used the previous harness settings: a 4-worker cap, memory_mode = "server", the system allocator, and LogsSinceLast(1000). Treat the comparison as one sample of those two setups, not a rotated median.

The published charts, versions, and fairness notes are at dev.kalamdb.org/docs/current/server/benchmarking/comparison. The internal report is bench-2026-11-20-214433-0-9-0 on the benchmarking page.

Dart and TypeScript

  • The TypeScript client keeps SHARED version domains across login() after a basic-auth re-login. A live query can resume from its checkpoint instead of failing with CURSOR_EXPIRED.
  • kalam_sync resumes a paused session without racing the connection stream. The outbox flushes only when actions are pending. Resume emits a connected event, waits for that flush, and then accepts the local read so an offline write does not race its own live echo.
  • Dart SDK publish and the Flutter analyzer blockers on this branch are fixed. Offline readReceipts catches up from a fresh peer before the test asserts.

Python schema generation

kalam schema gen writes Python beside TypeScript, Dart, and Rust. schema.sql is the source. The generator emits typed columns, table declarations, and SQL builders on kalamdb.schema, and the runtime encodes and decodes the wire values the server sends. The example project is examples/simple-python. Generated Python does not emit DDL. Table options stay server-managed.

Admin UI

  • The setup wizard keeps server failures on screen. It reads non-JSON error bodies and checks the username alphabet before submit.
  • Login, setup, and the OAuth callback use a new light-green layout: branding, a show-or-hide password control, and a loading state while a connected provider signs in. Sign-in behavior is unchanged.

Contributors

Welcome to Manik Khajuria (@Manik-Khajuria-5), a new contributor on this release. Thank you for the Python schema generator and kalamdb.schema runtime (#456), for showing setup failures instead of dropping them (#454), and for the new admin login and setup pages (#473).

What's Changed

New Contributors

Full Changelog: v0.8.0...v0.9.0

What's Changed

  • Fix TypeScript live resume after basic-auth re-login by @jamals86 in #417
  • fix(ui): surface setup wizard failures instead of silently discarding them by @Manik-Khajuria-5 in #454
  • Bump the npm_and_yarn group across 3 directories with 2 updates by @dependabot[bot] in #418
  • feat: add Python target to kalam schema gen and the kalamdb.schema runtime (python sdk -1) by @Manik-Khajuria-5 in #456
  • Improve Dart/Flutter pub.dev discovery, documentation and release quality by @jamals86 in #458

Full Changelog: v0.8.0...v0.9.0

What's Changed

  • Fix TypeScript live resume after basic-auth re-login by @jamals86 in #417
  • fix(ui): surface setup wizard failures instead of silently discarding them by @Manik-Khajuria-5 in #454
  • Bump the npm_and_yarn group across 3 directories with 2 updates by @dependabot[bot] in #418
  • feat: add Python target to kalam schema gen and the kalamdb.schema runtime (python sdk -1) by @Manik-Khajuria-5 in #456
  • Improve Dart/Flutter pub.dev discovery, documentation and release quality by @jamals86 in #458

Full Changelog: v0.8.0...v0.9.0