Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions docs/commands/repair/table-repair.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ Performs repairs on tables of divergent nodes based on the diff report generated
## Syntax

```bash
./ace table-repair <cluster_name> <schema.table_name> --diff-file=<diff_file> [--source-of-truth=<node>] [options]
./ace table-repair --diff-file=<diff_file> [--source-of-truth=<node>] [options] <cluster_name> <schema.table_name>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Syntax inconsistency: cluster_name shown as required but described as optional.

The syntax shows <cluster_name> without square brackets (indicating it's required), but line 13 describes it as "Optional." If cluster_name is indeed optional and can default to default_cluster from ace.yaml, the syntax should use [<cluster_name>] with square brackets.

📝 Proposed fix if cluster_name is optional
-./ace table-repair --diff-file=<diff_file> [--source-of-truth=<node>] [options] <cluster_name> <schema.table_name>
+./ace table-repair --diff-file=<diff_file> [--source-of-truth=<node>] [options] [<cluster_name>] <schema.table_name>
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
./ace table-repair --diff-file=<diff_file> [--source-of-truth=<node>] [options] <cluster_name> <schema.table_name>
./ace table-repair --diff-file=<diff_file> [--source-of-truth=<node>] [options] [<cluster_name>] <schema.table_name>
🤖 Prompt for AI Agents
In `@docs/commands/repair/table-repair.md` at line 8, Update the usage syntax to
match the documented optionality: if cluster_name is optional and defaults to
default_cluster in ace.yaml, change the command usage line "./ace table-repair
--diff-file=<diff_file> [--source-of-truth=<node>] [options] <cluster_name>
<schema.table_name>" to use square brackets around cluster_name
("[<cluster_name>]") and add a brief note that it defaults to default_cluster
from ace.yaml; alternatively, if cluster_name is required, change the
description that currently says "Optional" to "Required." Locate the usage
string and the descriptive line in table-repair.md (the "./ace table-repair ..."
line and the cluster_name description) and make the corresponding edit so syntax
and description are consistent.

```

- `cluster_name`: Name of the cluster. Optional. Overrides `default_cluster` in `ace.yaml` if specified.
- `schema.table_name`: Schema‑qualified table name to repair.
- `--diff-file`: Path to the diff JSON file.
- `--source-of-truth` (`-r`): Authoritative node for repairs. *Required* unless you run in bidirectional insert-only mode **or** `--fix-nulls`.
- - `cluster_name`: Name of the cluster. Optional. Overrides `default_cluster` in `ace.yaml` if specified.
- `schema.table_name`: Schema‑qualified table name to repair.

## Options

Expand Down Expand Up @@ -42,10 +42,11 @@ Performs repairs on tables of divergent nodes based on the diff report generated
## Example

```sh
./ace table-repair acctg public.customers_large \
./ace table-repair \
--diff-file=public_customers_large_diffs-20250718134542.json \
--source-of-truth=n1 \
--generate-report
--generate-report \
acctg public.customers_large
```

Diff reports share the same prefix generated by `table-diff` (for example `public_customers_large_diffs-20250718134542.json`). When you request a dry run or report, ACE also writes JSON summaries under `reports/<YYYY-MM-DD>/repair_report_<HHMMSS.mmm>.json` (or `dry_run_report_<...>.json`).
Expand Down
Loading