Decisions D40 to D88 in short
A one-paragraph summary of each design decision from D40 (UDP transport) to D88 (triggers), in order, with a pointer to the page that explains the mechanism.
This is a summary in the words of this documentation of the decisions recorded in the decision log from D40 to D88. The full text, with the measurements and rejected alternatives, is in the log; the design decisions chapter has the reasons behind the main choices. Decisions are numbered in the order they were written, not always the order they were made.
Server, replication and control plane (D40 to D51)#
| Decision | Summary |
|---|---|
| D40 | A UDP transport for Ping, Use, Get, Put, Delete and Filter in single datagrams of at most 1,400 bytes, authenticated, with sessions obtained over TCP and a hybrid client that falls back to TCP. See raftdb-server. |
| D41 | A separate watcher restarts and cleans up only what is basic and safe, and reports everything. See Watcher. |
| D42 | Automatic failover with Raft inside the server, tested with kill -9; later removed by D51 C4. |
| D43 | The disk-resident LSM engine, so restart time and capacity do not depend on RAM. See LSM. |
| D44, D45 | A first run with no flags, profiles and one settings file; install-service. |
| D46 to D49 | Server tables on the LSM engine (opt in), their replication and failover, their secondary indexes, and the read-path work that closed the gap to the in-memory engine from 2.6 times to 1.27 times. |
| D50 | Partitions with a group each, built in layers: groups with a primary each under the watcher, forwarding, then partitioned tables. See Raft. |
| D51 | The control plane lives in the watcher; the database keeps only a fence (epoch and lease). Steps C1 (fence), C2 (watcher quorum), C3 (resource control), C4 (election removed from the server). The watcher costs the data path no latency (measured). |
MySQL front-end, correctness (D52 to D61, D64)#
| Decision | Summary |
|---|---|
| D52 | MySQL compatibility is a connector, one crate per database; only missing features go into the core. Levels 1a (protocol), 1b (tables and rows), 1c (prepared statements), 2a (unique keys through claim tables), 2b (information_schema). |
| D53 | Fatal-error reports (raftdb-report), default off. |
| D54 | MySQL accounts and privileges, stored in the hidden database __rdb_accounts. |
| D55, D56 | The general SELECT executor; ALTER TABLE, multi-table writes, INSERT ... SELECT. |
| D57 | Transactions that are atomic but not isolated. See MVCC. |
| D58 | Indexed reads through pushdown; DECIMAL up to 65 digits, ENUM, SET, BLOB, BINARY. |
| D59 to D61 | The function library, regular expressions, CAST; each front-end shows only its own databases; gaps closed against real MySQL 9.7 for PrestaShop, SQLyog and phpMyAdmin. |
| D64 | Foreign keys with enforcement, BIT, fractional seconds; a 15 MB application dump loads and round-trips (47 tables with rows, 74,878 rows, identical to real MySQL). |
MySQL front-end, performance (D62, D63, D65 to D69)#
| Decision | Summary |
|---|---|
| D62, D63, D65 | The first measurement against MySQL 9.7 and the definition cache; bounds on one field as one index range; the planner no longer lists half the table, rows are read in binary, one connection per table. |
| D66, D67 | Reads on the connection's thread, the server inside the front-end (embed), rows sent together: level with or ahead of MySQL in one process, which becomes the default way to run. |
| D68 | An allocation cache per thread, a bounded look before a blocking receive, a join's tables read at once. |
| D69 | Protocol version 2 (streams, fields instead of rows, one wait for the disk); the sessions' reads by key share a connection. |
See Pushdown and the executor.
MySQL front-end, features (D70 to D78, D83 to D88)#
| Decision | Summary |
|---|---|
| D70, D71, D72 | Views; CREATE TABLE ... LIKE and AS SELECT; temporary tables. |
| D73 to D77 | CHECK constraints; generated columns; invisible columns and indexes; functional indexes; the rules for what those may contain and the index answering the expression. |
| D78 | The type of an expression is worked out as MySQL does (exprtype.rs). See Expressions and types. |
| D83 | ANALYZE, OPTIMIZE, CHECK and REPAIR TABLE answer as a healthy InnoDB table; the regular-expression functions. |
| D84 | GROUP BY ... WITH ROLLUP; the JSON operators ->, ->> and MEMBER OF. |
| D85 | Row comparisons, ANY / SOME / ALL, standard SUBSTRING and FETCH forms, X'..' literals, names that start with digits. |
| D86 | Any table name MySQL allows (stored encoded), MySQL's JSON error words, the real character-set and collation lists, a stale-binding fix. |
| D87, D88 | Stored procedures and functions with several result sets; triggers. See Routines and triggers. |
Two dialects (D79 to D82)#
| Decision | Summary |
|---|---|
| D79 | One program, two dialects (dialect = mysql or mariadb), with identification as MariaDB 11. |
| D80 | MariaDB connectors, error wording, big integers and exact decimals; the statement-level coverage harness. |
| D81 | System variables, SQL-level PREPARE, OR REPLACE and IF [NOT] EXISTS, RETURNING, sequences, expression defaults. |
| D82 | Other type names, UUID / INET4 / INET6, 60 more functions, the JSON functions, more aggregates. |
See Dialects.
How the decisions were checked#
Each of these decisions was checked by running a script through the real client against both Raft DB and a real MySQL server, or by a test in the crate. The decision text records which scripts were identical and which differences remain. This page does not repeat those results.