Changelog and roadmap

Performance and error reporting, D65 to D69

Entries D53 and D65 to D69: protocol version 2, allocator and spin changes, one-process mode, fatal-error reporting.

Unreleased version (Stage 0), section Added.

  • Performance (D69): protocol version 2 for programs with many callers (Stream, Defer, Sync, Project; version 1 clients are served as before): raftdb_client::Mux puts many callers on few connections as streams; the server keeps a place per stream, runs long requests and queued filters on helper threads, and fails a dropped table's streams instead of closing. raftdb-mysql in two processes: a statement is sent only the columns it reads, a transaction waits for the disk once, and the sessions' reads by key share one connection (raftdb_connections, raftdb_share = reads | all). Through JDBC against MySQL 9.7, two processes: 1 connection key read 1.08x, range read 1.21x, join 1.25x, transaction 1.30x; 16 connections key read 0.93x (0.66x before, same PC), range read 0.95x, join 1.02x, transaction 1.11x. muxbench example; JDBC benchmark variants cN, xall.
  • Performance (D68): the raftdb-server and raftdb-mysql programs use the system allocator with a per-thread cache of freed blocks (raftdb_server::pool; settings alloc-cache, alloc_cache); a connection that is exchanging messages looks for the next one for at most spin-us / spin_us microseconds (default 150, 0 = off) before its thread sleeps (raftdb_client::wait: off for idle connections and when many are busy; Windows and Linux, never with the portable feature); the server writes a page of rows into the reply where they are stored; the client passes rows on without copying them (get_with, filter_each) and can send a filter ahead of reading its answer (filter_start/filter_finish); the MySQL front-end reads both tables of a join at once over a connection when the first table's conditions bound the joined key, and reads its definition caches under a read-write lock. Through JDBC against MySQL 9.7 at one connection, two processes (three runs; the lowest figures are from a run during which the PC was busy): key read 0.63x -> 0.95-1.41x, range read 0.69x -> 0.95-1.84x, join 0.43x -> 0.73-1.78x, transaction 0.85x -> 1.12-3.36x; one process at 16 connections: join 1.15-1.83x, SELECT 1 1.28-1.31x, SET 1.18-1.28x, key read 1.43-1.58x. Two processes at 16 connections stay at 0.74-0.90x for reads (two more thread wake-ups per round trip). Tools: JDBC benchmark variants (rdb2/s0, raftdb/a0) with a CPU option, filterbench.
  • Benchmark (D68): JdbcBench inserts its single rows into a table of their own (v); before, the faster inserter was given a join over several times more rows, which was the "unstable" join at 16 connections.
  • Performance (D66): reads answered on the connection's own thread (raftdb-server: read-write lock around a shard's table, direct socket replies), the in-process client raftdb_server::Local, and embed = raftdb.conf in raftdb-mysql (the server inside the front-end). Multi-row INSERT sent together, a transaction waits for the disk once, aggregates computed in Raft DB, a leaner executor. Through JDBC in one process, against MySQL 9.7: key read 1.2-1.5x, range read 1.4-1.9x, join 1.0-1.6x, transaction 1.2-2.0x, bulk load 1.2-1.5x, updates and inserts 5-6x (two processes: reads 0.6-0.8x, the loopback round trip). Tools: execbench, the JDBC benchmark with backends mysql, raftdb and rdb2, and the comparison harness in embedded mode.
  • MySQL front-end (D67): one-process mode (embed) is the documented default; the demo endpoint runs that way.
  • Fatal-error reporting (D53): raftdb-report crate, wired into raftdb-server, raftdb-watch, raftdb-mysql; local reports always, remote only when configured.
  • Performance (D65): range reads and joins about 10x faster (planner, binary rows, per-table connections); see D63-D65.