Manually repair a corrupted table. Returns information about affected tables.
Parameters
List of tables to query. An asterisk returns all tables. The user can provide a single element (which will be automatically promoted to a list internally) or a list.
ID of the type per table.
Optional parameters. Allowed keys are:
repair_policy – Corrective action to take. Allowed values are:
delete_chunks – Deletes any corrupted chunks.
shrink_columns – Shrinks corrupted chunks to the shortest column.
replay_wal – Manually invokes write-ahead log (WAL) replay on the table.
alter_table – Reset columns modification after incomplete alter column.
resync_replicas – Repairs replicated tables whose record counts differ across the worker ranks and toms: the copy with the most records is kept, and every other copy is replaced with it. That copy may include records from a load that did not complete, or records that a delete did not remove. A table whose copies all have the same number of records is not repaired, even if their contents differ. Views cannot be named in input parameter table_names; a named table that is not replicated is reported in output parameter repair_status. An asterisk selects every replicated table. The repair runs only while no other requests are running. The repaired tables are listed in the repaired_replicated_tables entry of the response output parameter info map.
verify_all – If false only table chunk data already known to be corrupted will be repaired. Otherwise the database will perform a full table scan to check for correctness. Allowed values are:
true
false
The default value is ‘false’.
The default value is an empty dict ( ).
Returns
A dict with the following entries–
List of repaired tables.
List of repair status by table.
Additional information. Allowed keys are:
repaired_replicated_tables – If repair_policy is resync_replicas, comma-separated list of the replicated tables that were repaired.
The default value is an empty dict ( ).