Repository navigation
tsk 0.23.0
A local Dolt server for the ledger store, behind a switch that is off by default. With the switch on, a thread pause takes 0.50 s through a 330 ms network shim, where it takes 0.82 s with the switch off. A tsk mission list takes 15 ms where it takes 99 ms. The figures come from one machine, medians of 7 runs.
TSK_DOLT_SERVER=onor[ledger] server = "on"turns the server on. The environment wins over the user config. The default is off, and with it offtskstarts exactly thedoltprocesses that 0.22.0 starts. A run of 101 commands over four scripts gave the same output, errors, exit codes anddoltprocess counts as a 0.22.0 binary.- One
dolt sql-serverfor each ledger store, started by the first command that needs it. A command sends its SQL over a Unix socket in the store directory in place of startingdolt sql. A command starts nodoltprocess for its SQL, and a fetch, a push, a merge and a commit run as Dolt procedures. Amission listtakes 15 ms, atask add23 ms, and a push with a change 0.46 s where it took 0.73 s. Thedoltprocesses that stay areinit,clone,remoteandconfig, and every command on a store that still uses Dolt's git blobstore (runtsk ledger migrate-transportfirst). - The server stops by itself. It stops after 120 s with no connection (
TSK_DOLT_SERVER_IDLE_SECS), when the store directory is gone, and ontsk ledger server stop. Each server holds about 90 MB while it runs. - A dead, stale or hung server is replaced. A command checks the socket with
select 1(5 s,TSK_DOLT_SERVER_PROBE_SECS). A socket file left bykill -9or a stopped container is cleared and a server starts. A server that does not answer is killed and replaced. Two commands that start at once start one server. A cloud session that wakes from hibernation gets a live server from theSessionStarthook:tsk thread session-startchecks it first and starts it in the background. tsk ledger server status|start|stop.statusprints the state, the pids, the socket, the port, the idle time, the log and the switch with its source.- While a server runs,
doltopens the ledger store read only.tskremoves.dolt/sql-server.infoonce the server answers. Without it,dolt sql -r jsonanddolt logread the store and print typed JSON, and a write fails withdatabase is read only. With it, Dolt hands the query to the server and every number in the answer is a string, which made a 0.22.0tskread task numbers as 0 and write duplicate rows (measured). To write by hand, runtsk ledger server stopfirst. A 0.23.0tskwith the switch off stops the server of a store when its first write is refused, and goes on. - No new crate. The MySQL client is
cli/src/ledger/store/mysql.rs, about 470 lines. Themysqlcrate does not build with default features off, and with them it adds 119 crates to the lock file. doltrow readers accept numbers as strings.integer,flagandfirst_countread"1"as well as1, so adolt sql -r jsonanswer from a server does not change a result.- Update
tskand the plugin together. Atskolder than 0.23.0 works against the same ledger when no server runs. With a server running it reads correctly and fails on a write, until the server stops. Runtsk ledger server stopbefore a downgrade. - Tests:
cli/tests/dolt_server.rs(17 cases: the switch, start and stop,kill -9with the socket left behind, a hung server, simultaneous starts, the hook, the idle stop, a deleted store, thedoltcommand line beside a server, two clones, a conflict and a renumbering), and inconformance.rsthe four scripts of the batching cases run with the server off and on, with a launch count that must fall by half. Test fixtures set a 3 s idle time and stop their servers when they drop. - Documents:
docs/adr/0018-a-local-dolt-server-per-ledger-store-behind-a-switch.md,docs/arch/2026-10-21-local-dolt-server-results.md.
Commits
- Local Dolt server per ledger store behind a switch (0.23.0) (d5a7120)
- Add a local Dolt server per ledger store behind a switch (0.23.0, work in progress) (50a89f4)
- Spike: a local Dolt server per ledger store (c8fd607)
- Pin katex, source-map-js and markdown-it to patched versions in the overview deck (227043a)
Full Changelog: v0.22.0...v0.23.0