Changelog and roadmap

Server features, SQL, Studio and indexes

Entries for ORDER BY, CORS, Studio, databases and tables, SQL subset, accounts, bulk import, secondary indexes and Stage 2 to 3 server work.

Unreleased version (Stage 0), section Added. Newest first.

  • ORDER BY / LIMIT ... OFFSET in SQL: total order over mixed types (raftdb_exec::order), partial sort per shard and merge, stable paging by primary key, cursor = rows already returned (jump to any row). Top 100 of 1 M rows: 40 ms (24.8 queries/s, target 20); OFFSET 500000: 0.9 s.
  • Cross-origin access, off by default: --cors ORIGIN and --allow-remote-servers so one Studio page can connect to several servers (pre-flight answered without credentials, authentication unchanged). 1 test.
  • Studio ST2 (round 1 and 2): SSMS-style Object Explorer and tabs, multiple simultaneous connections, password and token login, New Database / New Table, lazy grid with row counts, SQL tab, import / export, view and edit modes. 265 Node tests.
  • Databases and tables: the server keeps dir/<database>/<table>/, creates them over HTTP, starts with main.documents (older single-table data is moved there); binary Use request; RDBMS names in the API (tables, columns, rows, ix_<column>); HTTP API minor 2. Tests: create/list/use/restart, legacy migration.
  • SQL subset (raftdb_exec::sql): SELECT * | COUNT(*) FROM t [WHERE ...] [LIMIT n] compiled to the executor's plan; over HTTP (language: "sql", errors with line and column) and the binary protocol (Filter sql flag).
  • Accounts: users with PBKDF2-HMAC-SHA-256 password hashes (SHA-256, HMAC, PBKDF2 written and checked against published vectors), POST /v1/auth/login sessions, user NUL password in Hello, --user; GET /v1/auth/info.
  • Bulk import endpoint (NDJSON, durable on return); query results carry the row keys.
  • Secondary indexes wired in: Table::create_index / candidates / maintenance on writes (index definitions in the log and checkpoints), Plan::required_leaves, Collection::{slot_of, generation, snapshot_of}, protocol CreateIndex, HTTP POST .../indexes, shards narrow scans through indexes. Over TCP, 1 M documents: a point query takes 12.7k/s through an index vs 163/s by scanning (78x). A random-operations test found and fixed a stale-position bug after compaction. 2 db tests, 2 server tests, 1 HTTP test.
  • raftdb-index (standalone, not wired into queries yet): secondary index as a sorted run of (key, slot) pairs plus a small overlay; ordered numeric keys and hash keys; 5 tests; suite index (12 B/entry, 2.23M lookups/s, 372M range entries/s, 1.44M updates/s). First update version ran 267k/s and was tuned (merge-join, no run checks).
  • Stage 2d started: HTTP on the server port (protocol sniffing), JSON admin/query API subset (/v1/server, databases, collections, stats, POST /v1/query, document write/read/delete), Studio static files with strict CSP, bearer-token check, raftdb-server command-line binary. 5 HTTP tests.
  • Stage 3 (filters over the network): server-wide field-name registry shared by all shards; protocol FieldId, PutJson, Filter JSON-output flag; filter counts and cursor-paged results (binary or JSON) fanned out over shards; raftdb_doc::to_json, raftdb_exec::json::encode; raftdb_store::SlotCache (cached scan list); parallel counting scan inside a shard. Over loopback TCP: filter scan 57.2M docs/s (target 50M), page of 100 as JSON 0.46 ms. 4 more end-to-end tests (11), 4 JSON round-trip tests.
  • raftdb-server (Stage 2b): TCP server, reader/writer thread per connection, shard threads owning tables, flusher threads (group commit), blocking test client; 7 end-to-end tests; suite server: 5.56M point reads/s and 1.21M durable inserts/s over loopback TCP (targets 2M and 300k).
  • raftdb-proto (Stage 2a): wire protocol codec, 6 tests, suite proto (49.9M messages/s, target 20M). The Stage 2 design document: server design, sub-stages, assumed owner defaults.
  • raftdb-db: schema persisted in the log (SCHEMA record, Schema::encode/decode with pinned bytes and damage tests); Table::checkpoint rewrites the log (3.79M live docs/s, log 0.50 of its size, restart 503 -> 315 ms); raftdb-wal encode_record and end_lsn. 7 tests in raftdb-db, 7 in raftdb-schema.
  • raftdb-wal Storage trait (Wal<S = File>, Wal::open_storage) and Table<S> / Table::open_storage; raftdb_sim::table runs the real Table and Wal on the simulated disk: 30,000 crash schedules clean, planted storage bug found in 80 schedules, 993 schedules/s.
  • Studio ST0 and ST1: admin API draft, wireframes and design tokens; file viewer with exact JSON parser, Raft DB filter language in JS, virtual grid, tree/raw views, export; 207 Node tests. The conformance test of raftdb-exec runs the shared filter cases (119 + 28) against the real executor: all pass.
  • Suite db open-loop latency test at 300k inserts/s: p50 0.70 ms, p99 6-14 ms (target 2 ms FAILS on the dev PC, stalls of 5-29 ms from the machine; to re-run on the Linux reference host). A diagnostic switch for it.