Expand description
doctor — every table’s VERIFY counters, turned into an exit code
a cron can act on.
backfill-keys — the union of every structure that can name an item.
Lesson 3 of the migration playbook, and only the half a machine can do. The lesson splits itself: “build the backfill key-set from the union of every structure that can name an item (old indexes, the primary keyspace scan, archives), then write rows from the authoritative record.” The union is mechanical. What the authoritative record is, and what a row looks like, is knowledge that lives in the application — a tool that guessed would write the wrong rows confidently.
So this command produces the key-set and nothing else, and it splits its output the way a pipeline needs: the names go to stdout, one per line, ready to feed whatever writes the rows; the accounting goes to stderr, so redirecting the list does not lose it.
The accounting is the point of doing this at all. Each source reports how many names only it contributed — and every non-zero number there is a row that backfilling from any single source would have missed. That is the 89 % / 76 % drift the lesson was paid for, measured on your own data instead of quoted from someone else’s.
Structs§
- Source
Report - What one source contributed.
- Union
- The union, and where each name came from.
Enums§
- Source
- Where a set of item names comes from.
Functions§
- collect
- Read every source and union their names.
- print_
report - The accounting, on stderr so redirecting the names keeps it.
- run_
backfill_ keys_ cli backfill-keys [-h host] [-p port] --from-index K --from-prefix P [--keep-prefix] --from-file F …