ACE Repair Commands
Using the ACE table-repair Command
The table-repair command fixes data inconsistencies identified by table-diff. It uses a specified node as the source of truth to correct data on other nodes, and provides options to perform specific and targeted repairs.
Typical scenarios
- Spock exception repair: Resolve conflicts from insert/update/delete exceptions.
- NULL-only drift: Use
--fix-nullsto cross-fill NULL columns without a single source-of-truth. - Network partition repair: Re‑align nodes after a partition.
- Temporary node outage: Catch a lagging node up.
- Catastrophic node failure recovery: Use origin-scoped diffs plus recovery-mode repair to reconcile survivors when a node fails mid-replication.
Safety & audit features
- Dry run mode: see proposed changes without modifying data.
- Report generation: write a detailed audit of actions taken.
- Upsert‑only: prevent deletions on divergent nodes.
- Checked row operations: each differing row is inserted, updated or deleted by one statement that must change exactly one row. Rows are sent in commands of up to 1000 rows of one kind, and each command is one transaction. A command with a failed row is rolled back as a whole, its rows are listed in the report, and repair goes on with the next command. If any row was not applied, the task fails at the end. See How repair applies the changes.
- Advanced repair plans: drive repairs from a versioned YAML/JSON file with per-table rules, overrides, and custom rows. See Advanced repair and Examples.
Helpful Tips
- Use
--dry-runfirst to review changes. - Use
--upsert-onlyor--insert-onlyfor sensitive tables to avoid deletes. table-repaironly fixes rows present in the diff file. If a diff is too large, consider breaking the table into filtered chunks (table-diff ... --table-filter/-F) and repairing iteratively.- For very large, multi‑table incidents, a dump/restore may be more practical.