Skip to content

tsk 0.23.0

Choose a tag to compare

@github-actions github-actions released this 21 Oct 19:58
d5a7120

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=on or [ledger] server = "on" turns the server on. The environment wins over the user config. The default is off, and with it off tsk starts exactly the dolt processes that 0.22.0 starts. A run of 101 commands over four scripts gave the same output, errors, exit codes and dolt process counts as a 0.22.0 binary.
  • One dolt sql-server for 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 starting dolt sql. A command starts no dolt process for its SQL, and a fetch, a push, a merge and a commit run as Dolt procedures. A mission list takes 15 ms, a task add 23 ms, and a push with a change 0.46 s where it took 0.73 s. The dolt processes that stay are init, clone, remote and config, and every command on a store that still uses Dolt's git blobstore (run tsk ledger migrate-transport first).
  • 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 on tsk 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 by kill -9 or 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 the SessionStart hook: tsk thread session-start checks it first and starts it in the background.
  • tsk ledger server status|start|stop. status prints the state, the pids, the socket, the port, the idle time, the log and the switch with its source.
  • While a server runs, dolt opens the ledger store read only. tsk removes .dolt/sql-server.info once the server answers. Without it, dolt sql -r json and dolt log read the store and print typed JSON, and a write fails with database 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.0 tsk read task numbers as 0 and write duplicate rows (measured). To write by hand, run tsk ledger server stop first. A 0.23.0 tsk with 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. The mysql crate does not build with default features off, and with them it adds 119 crates to the lock file.
  • dolt row readers accept numbers as strings. integer, flag and first_count read "1" as well as 1, so a dolt sql -r json answer from a server does not change a result.
  • Update tsk and the plugin together. A tsk older 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. Run tsk ledger server stop before a downgrade.
  • Tests: cli/tests/dolt_server.rs (17 cases: the switch, start and stop, kill -9 with the socket left behind, a hung server, simultaneous starts, the hook, the idle stop, a deleted store, the dolt command line beside a server, two clones, a conflict and a renumbering), and in conformance.rs the 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