Classes | |
| struct | MDBX_chk_line_t |
| A virtual row of the report generated during a database integrity check. More... | |
| struct | MDBX_chk_issue_t |
| An issue problem was discovered during a database integrity check. More... | |
| struct | MDBX_chk_scope_t |
| A hierarchical context during a database integrity check. More... | |
| struct | MDBX_chk_histogram |
| A histogram with some statistical information collected during a database integrity check. More... | |
| struct | MDBX_chk_table_t |
| Information about a certain key-value table during a database integrity check. More... | |
| struct | MDBX_chk_context_t |
| The context for checking the integrity of a database. More... | |
| struct | MDBX_chk_callbacks_t |
| A set of callback functions used for checking the integrity of a database. More... | |
| union | MDBX_chk_scope_t.usr_z |
| union | MDBX_chk_scope_t.usr_v |
| union | MDBX_chk_scope_t.usr_o |
| struct | MDBX_chk_histogram.ranges |
| struct | MDBX_chk_table_t.pages |
| struct | MDBX_chk_table_t.histogram |
| struct | MDBX_chk_context_t.result |
Macros | |
| #define | mdbx_env_open_for_recoveryT(env, pathname, target_mets, writeable) |
| #define | mdbx_preopen_snapinfoT(pathname, info, bytes) |
Functions | |
| LIBMDBX_API int | mdbx_env_turn_for_recovery (MDBX_env *env, unsigned target_meta) |
| Turn database to the specified meta-page. | |
Basically this is internal API for mdbx_chk tool, etc. You should avoid to use it, except some extremal special cases.
| struct MDBX_chk_line_t |
A virtual row of the report generated during a database integrity check.
| Class Members | ||
|---|---|---|
| char * | begin | |
| struct MDBX_chk_context * | ctx | |
| uint8_t | empty | |
| char * | end | |
| char * | out | |
| uint8_t | scope_depth | |
| uint8_t | severity | |
| struct MDBX_chk_issue_t |
An issue problem was discovered during a database integrity check.
| Class Members | ||
|---|---|---|
| const char * | caption | |
| size_t | count | |
| struct MDBX_chk_issue * | next | |
| struct MDBX_chk_scope_t |
A hierarchical context during a database integrity check.
Public Attributes | |
| MDBX_chk_issue_t * | issues |
| struct MDBX_chk_internal * | internal |
| const void * | object |
| MDBX_chk_stage_t | stage |
| MDBX_chk_severity_t | verbosity |
| size_t | subtotal_issues |
| union { | |
| void * | ptr |
| size_t | number |
| } | usr_z |
| union { | |
| void * | ptr |
| size_t | number |
| } | usr_v |
| union { | |
| void * | ptr |
| size_t | number |
| } | usr_o |
| struct MDBX_chk_internal* MDBX_chk_scope_t::internal |
| MDBX_chk_issue_t* MDBX_chk_scope_t::issues |
| const void* MDBX_chk_scope_t::object |
| MDBX_chk_stage_t MDBX_chk_scope_t::stage |
| size_t MDBX_chk_scope_t::subtotal_issues |
| union { ... } MDBX_chk_scope_t::usr_o |
| union { ... } MDBX_chk_scope_t::usr_v |
| union { ... } MDBX_chk_scope_t::usr_z |
| MDBX_chk_severity_t MDBX_chk_scope_t::verbosity |
| struct MDBX_chk_histogram |
A histogram with some statistical information collected during a database integrity check.
Public Attributes | |
| size_t | amount |
| size_t | count |
| size_t | le1_amount |
| size_t | le1_count |
| struct { | |
| size_t | begin |
| size_t | end |
| size_t | amount |
| size_t | count |
| } | ranges [9] |
| size_t MDBX_chk_histogram::amount |
| size_t MDBX_chk_histogram::count |
| size_t MDBX_chk_histogram::le1_amount |
| size_t MDBX_chk_histogram::le1_count |
| struct { ... } MDBX_chk_histogram::ranges[9] |
| struct MDBX_chk_table_t |
Information about a certain key-value table during a database integrity check.
Public Attributes | |
| MDBX_chk_user_table_cookie_t * | cookie |
| MDBX_val | name |
| MDBX_db_flags_t | flags |
| int | id |
| size_t | payload_bytes |
| size_t | lost_bytes |
| struct { | |
| size_t | all |
| size_t | empty |
| size_t | broken |
| size_t | branch |
| size_t | leaf |
| size_t | nested_branch |
| size_t | nested_leaf |
| size_t | nested_subleaf |
| } | pages |
| struct { | |
| struct MDBX_chk_histogram | height |
| struct MDBX_chk_histogram | large_pages |
| struct MDBX_chk_histogram | nested_height_or_gc_span_length |
| struct MDBX_chk_histogram | key_len |
| struct MDBX_chk_histogram | val_len |
| struct MDBX_chk_histogram | multival |
| struct MDBX_chk_histogram | tree_density |
| struct MDBX_chk_histogram | large_or_nested_density |
| struct MDBX_chk_histogram | page_age |
| struct MDBX_chk_histogram | pgno |
| } | histogram |
| MDBX_chk_user_table_cookie_t* MDBX_chk_table_t::cookie |
| MDBX_db_flags_t MDBX_chk_table_t::flags |
| struct { ... } MDBX_chk_table_t::histogram |
| int MDBX_chk_table_t::id |
| size_t MDBX_chk_table_t::lost_bytes |
| MDBX_val MDBX_chk_table_t::name |
| struct { ... } MDBX_chk_table_t::pages |
| size_t MDBX_chk_table_t::payload_bytes |
| struct MDBX_chk_context_t |
The context for checking the integrity of a database.
Public Attributes | |
| struct MDBX_chk_internal * | internal |
| MDBX_env * | env |
| MDBX_txn * | txn |
| MDBX_chk_scope_t * | scope |
| uint8_t | scope_nesting |
| struct { | |
| size_t | total_payload_bytes |
| size_t | table_total |
| size_t | table_processed |
| size_t | total_unused_bytes |
| size_t | unused_pages |
| size_t | processed_pages |
| size_t | reclaimable_pages |
| size_t | gc_pages |
| size_t | alloc_pages |
| size_t | backed_pages |
| size_t | problems_meta |
| size_t | tree_problems |
| size_t | gc_tree_problems |
| size_t | kv_tree_problems |
| size_t | problems_gc |
| size_t | problems_kv |
| size_t | total_problems |
| uint64_t | steady_txnid |
| uint64_t | recent_txnid |
| struct MDBX_chk_histogram | histogram_page_age |
| struct MDBX_chk_histogram | histogram_pgno_payload |
| struct MDBX_chk_histogram | histogram_pgno_retained |
| const MDBX_chk_table_t *const * | tables |
| } | result |
| MDBX_env* MDBX_chk_context_t::env |
| struct MDBX_chk_internal* MDBX_chk_context_t::internal |
| struct { ... } MDBX_chk_context_t::result |
| MDBX_chk_scope_t* MDBX_chk_context_t::scope |
| uint8_t MDBX_chk_context_t::scope_nesting |
| MDBX_txn* MDBX_chk_context_t::txn |
| struct MDBX_chk_callbacks_t |
A set of callback functions used for checking the integrity of a database.
The callback functions are designed to organize interaction with the application code. This includes the integration of application logic that verifies the integrity of a data structure above the key-value level, the preparation and structured output of information about both the progress and the results of verification.
All callback functions are optional, unused ones must be set to nullptr.
| bool(* MDBX_chk_callbacks_t::check_break) (MDBX_chk_context_t *ctx) |
| void(* MDBX_chk_callbacks_t::issue) (MDBX_chk_context_t *ctx, const char *object, uint64_t entry_number, const char *issue, const char *extra_fmt, va_list extra_args) |
| MDBX_chk_line_t *(* MDBX_chk_callbacks_t::print_begin) (MDBX_chk_context_t *ctx, MDBX_chk_severity_t severity) |
| void(* MDBX_chk_callbacks_t::print_chars) (MDBX_chk_line_t *, const char *str, size_t len) |
| void(* MDBX_chk_callbacks_t::print_done) (MDBX_chk_line_t *) |
| void(* MDBX_chk_callbacks_t::print_flush) (MDBX_chk_line_t *) |
| void(* MDBX_chk_callbacks_t::print_format) (MDBX_chk_line_t *, const char *fmt, va_list args) |
| void(* MDBX_chk_callbacks_t::print_size) (MDBX_chk_line_t *, const char *prefix, const uint64_t value, const char *suffix) |
| int(* MDBX_chk_callbacks_t::scope_conclude) (MDBX_chk_context_t *ctx, MDBX_chk_scope_t *outer, MDBX_chk_scope_t *inner, int err) |
| void(* MDBX_chk_callbacks_t::scope_pop) (MDBX_chk_context_t *ctx, MDBX_chk_scope_t *outer, MDBX_chk_scope_t *inner) |
| int(* MDBX_chk_callbacks_t::scope_push) (MDBX_chk_context_t *ctx, MDBX_chk_scope_t *outer, MDBX_chk_scope_t *inner, const char *fmt, va_list args) |
| int(* MDBX_chk_callbacks_t::stage_begin) (MDBX_chk_context_t *ctx, MDBX_chk_stage_t) |
| int(* MDBX_chk_callbacks_t::stage_end) (MDBX_chk_context_t *ctx, MDBX_chk_stage_t, int err) |
| int(* MDBX_chk_callbacks_t::table_conclude) (MDBX_chk_context_t *ctx, const MDBX_chk_table_t *table, MDBX_cursor *cursor, int err) |
| void(* MDBX_chk_callbacks_t::table_dispose) (MDBX_chk_context_t *ctx, const MDBX_chk_table_t *table) |
| MDBX_chk_user_table_cookie_t *(* MDBX_chk_callbacks_t::table_filter) (MDBX_chk_context_t *ctx, const MDBX_val *name, MDBX_db_flags_t flags) |
| int(* MDBX_chk_callbacks_t::table_handle_kv) (MDBX_chk_context_t *ctx, const MDBX_chk_table_t *table, size_t entry_number, const MDBX_val *key, const MDBX_val *value) |
| struct MDBX_chk_table_t.pages |
| struct MDBX_chk_table_t.histogram |
| Class Members | ||
|---|---|---|
| struct MDBX_chk_histogram | height |
Tree deep histogram |
| struct MDBX_chk_histogram | key_len |
Keys length histogram |
| struct MDBX_chk_histogram | large_or_nested_density |
Histogram of nested tree(s) branch and leaf pages filling in percents |
| struct MDBX_chk_histogram | large_pages |
Histogram of large/overflow pages length |
| struct MDBX_chk_histogram | multival |
Number of multi-values (aka duplicates) histogram |
| struct MDBX_chk_histogram | nested_height_or_gc_span_length |
Histogram of nested trees height, span length for GC |
| struct MDBX_chk_histogram | page_age |
Histogram of pages age |
| struct MDBX_chk_histogram | pgno |
Histogram of used pgno |
| struct MDBX_chk_histogram | tree_density |
Histogram of branch and leaf pages filling in percents |
| struct MDBX_chk_histogram | val_len |
Values length histogram |
| struct MDBX_chk_context_t.result |
| Class Members | ||
|---|---|---|
| size_t | alloc_pages | |
| size_t | backed_pages | |
| size_t | gc_pages | |
| size_t | gc_tree_problems | |
| struct MDBX_chk_histogram | histogram_page_age |
Histogram of pages age |
| struct MDBX_chk_histogram | histogram_pgno_payload |
Histogram of pgno retained by readers |
| struct MDBX_chk_histogram | histogram_pgno_retained |
Histogram of pgno used by all payload |
| size_t | kv_tree_problems | |
| size_t | problems_gc | |
| size_t | problems_kv | |
| size_t | problems_meta | |
| size_t | processed_pages | |
| uint64_t | recent_txnid | |
| size_t | reclaimable_pages | |
| uint64_t | steady_txnid | |
| size_t | table_processed | |
| size_t | table_total | |
| const MDBX_chk_table_t *const * | tables |
A pointer to the array of table_total pointers to instances of MDBX_chk_table_t structures with information about all key-value tables, including MainDB and GC. |
| size_t | total_payload_bytes | |
| size_t | total_problems | |
| size_t | total_unused_bytes | |
| size_t | tree_problems | |
| size_t | unused_pages | |
| #define mdbx_env_open_for_recoveryT | ( | env, | |
| pathname, | |||
| target_mets, | |||
| writeable ) |
| #define mdbx_preopen_snapinfoT | ( | pathname, | |
| info, | |||
| bytes ) |
| LIBMDBX_API int mdbx_env_turn_for_recovery | ( | MDBX_env * | env, |
| unsigned | target_meta ) |
Turn database to the specified meta-page.
This function mostly of internal API for mdbx_chk utility and subject to change at any time. Do not use this function to avoid shooting your own leg(s).