Skip to main content
admin_verify_db(options=)[source]

Verify database is in a consistent state. When inconsistencies or errors are found, the verified_ok flag in the response is set to false and the list of errors found is provided in the error_list.

Parameters

options (dict of str to str) –

Optional parameters. Allowed keys are:

  • rebuild_on_error – [DEPRECATED] Use the Rebuild DB feature of GAdmin instead. Allowed values are:

    • true

    • false

    The default value is ‘false’.

  • verify_nulls – When true, verifies that null values are set to zero. Allowed values are:

    • true

    • false

    The default value is ‘false’.

  • verify_persist – When true, persistent objects will be compared against their state in memory and workers will be checked for orphaned table data in persist. To check for orphaned worker data, either set concurrent_safe in input parameter options to true or place the database offline. Allowed values are:

    • true

    • false

    The default value is ‘false’.

  • concurrent_safe – When true, allows this endpoint to be run safely with other concurrent database operations. Other operations may be slower while this is running. Allowed values are:

    • true

    • false

    The default value is ‘true’.

  • verify_rank0 – If true, compare rank0 table metadata against workers’ metadata. Allowed values are:

    • true

    • false

    The default value is ‘false’.

  • delete_orphaned_tables – If true, orphaned table directories found on workers for which there is no corresponding metadata will be deleted. It is recommended to run this while the database is offline OR set concurrent_safe in input parameter options to true. Allowed values are:

    • true

    • false

    The default value is ‘false’.

  • verify_orphaned_tables_only – If true, only the presence of orphaned table directories will be checked, all persistence and table consistency checks will be skipped. Allowed values are:

    • true

    • false

    The default value is ‘false’.

  • repair_replicated_tables – When true, replicated tables whose record counts differ across the worker ranks and toms are repaired: 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 detected, even if their contents differ. The output parameter verified_ok flag and output parameter error_list still report the inconsistencies found before the repair; run the verification again to confirm the repair. Only the tables selected by table_includes or table_excludes are repaired. Requires concurrent_safe to be true, and cannot be used with verify_orphaned_tables_only. The repaired tables are listed in the repaired_replicated_tables entry of the response output parameter info map. Allowed values are:

    • true

    • false

    The default value is ‘false’.

  • table_includes – Comma-separated list of table names to include when verifying table consistency on wokers. Cannot be used simultaneously with table_excludes.

  • table_excludes – Comma-separated list of table names to exclude when verifying table consistency on wokers. Cannot be used simultaneously with table_includes.

The default value is an empty dict ( ).

Returns

A dict with the following entries–

verified_ok (bool) –

True if no errors were found, false otherwise. The default value is False.

error_list (list of str) –

List of errors found while validating the database internal state. The default value is an empty list ( [] ).

orphaned_tables_total_size (long) –

If verify_persist is true, verify_orphaned_tables_only is true or delete_orphaned_tables is true, this is the sum in bytes of all orphaned tables found. Otherwise, -1.

info (dict of str to str) –

Additional information. Allowed keys are:

  • repaired_replicated_tables – If repair_replicated_tables is true, comma-separated list of the replicated tables that were repaired.

The default value is an empty dict ( ).