Expand description
doctor — run every table’s VERIFY and turn the counters into an
exit code.
Lesson 8 of the migration playbook: make VERIFY part of
operations, not part of the migration. The counters are fresh on
every call and cheap enough for a cron; what was missing is the
shell that turns them into something a cron can act on.
The mapping is the lesson’s own words, not a new opinion:
driftandmissingshould be zero forever — non-zero is a failure;- non-zero
duplicateson an ORDERPATH means pagination needs a bounded tie-break — a warning about a design choice, not a corruption; absent/excluded/coerce_failuresname the rows each exclusion cause claimed — reported, never failed on, because every one of them is a legitimate state.
And one thing the lesson could not have known: TABLE.VERIFY
answers -INDEXBUILDING while a backfill is still running. A cron
that read that as a failure would page someone every time an index
was declared, so it is its own outcome.
Structs§
- Table
Health - One table’s name and what was concluded about it.
Enums§
- Health
- What
doctorconcluded about one table.
Functions§
- check_
table - Verify one table and read its counters against lesson 8’s mapping.
- run
- Check every table and print one line each. Exit non-zero only on drift — a warning is information, and a cron that fails on information stops being read.
- run_
doctor_ cli doctor [-h host] [-p port] [--warn-is-failure]- table_
names - Every declared table’s name, in declaration order.