Zum Hauptinhalt springen

RepairRollups

Repairs the rollup inconsistencies that ValidateRollups finds after a restore (rows above the pointer, a pointer without rows, a watermark ahead of the rows, a missing generation map). Idempotent: a second run on a repaired tenant finds nothing to do. Dry run by default: lists the planned steps per rollup and changes nothing; --apply runs them.

Examples​

Dry run: list the planned repairs per rollup, change nothing:

octo-cli -c RepairRollups

Repair all rollups, wait for the recompute jobs and validate again:

octo-cli -c RepairRollups -a -w

Repair one rollup without the confirmation prompt (automation):

octo-cli -c RepairRollups `
-id "69fda707d47638c68edc7fea" `
-a `
-y

Options​

ShortLongRequiredDescription
-id--identifiersnoOptional: comma-separated runtime ids of the rollup archives to repair (default: all rollups of the tenant)
-a--applynoRun the repair (default is a dry run that changes nothing)
-w--waitnoAfter --apply: poll the repair request until it is Done or Failed and print the final report
-y--yesnoSkip confirmation prompt
-j--jsonnoOutput the report as raw JSON

Notes​

DR runbook after a CrateDB restore: ValidateRollups, then RepairRollups (dry run), then RepairRollups --apply --wait.

Without --apply nothing is written and no confirmation is asked.

--apply deletes rows above the generation the pointer selects, rewinds watermarks, creates missing generation maps and recomputes ranges. The server only accepts a repair request and executes it in the background; it keeps running when this command ends. A second --apply while a repair is active returns the active request.

--wait polls the request (up to 4 hours) and prints the final report; the command exits non-zero when the repair failed. Without --wait, follow it with GetRollupRepairStatus -rid <requestId>.

Idempotent: repeating the command is safe.

The tenant is the tenant of the active context.