|
Zero
0.1.0
|
The context object maintained throughout the verification. More...
#include <btree_verify.h>
Public Member Functions | |
| verification_context (int hash_bits) | |
| ~verification_context () | |
| void | add_fact (PageID pid, int16_t level, bool high, size_t key_len, const char *key) |
| void | add_fact (PageID pid, int16_t level, bool high, size_t prefix_len, const char *prefix, size_t suffix_len, const char *suffix) |
| void | add_fact (PageID pid, int16_t level, bool high, const w_keystr_t &key) |
| void | add_expectation (PageID pid, int16_t level, bool high, size_t key_len, const char *key) |
| void | add_expectation (PageID pid, int16_t level, bool high, size_t prefix_len, const char *prefix, size_t suffix_len, const char *suffix) |
| void | add_expectation (PageID pid, int16_t level, bool high, const w_keystr_t &key) |
| bool | is_bitmap_clean () const |
Public Attributes | |
| char * | _bitmap |
| int | _bitmap_size |
| const int | _hash_bits |
| int | _pages_checked |
| int | _pages_inconsistent |
Private Member Functions | |
| verification_context () | |
| verification_context (const verification_context &) | |
Static Private Member Functions | |
| static uint32_t | _modify_hash (const char *data, size_t len, uint32_t hash_value) |
| static uint32_t | _modify_hash (uint32_t data, uint32_t hash_value) |
The context object maintained throughout the verification.
This object is used only for batch (in-detail) verification. For in-page verification, this isn't required.
| verification_context::verification_context | ( | int | hash_bits | ) |
| verification_context::~verification_context | ( | ) |
|
private |
|
private |
|
staticprivate |
|
staticprivate |
|
inline |
same as add_fact(), but has different function name to make the code more readable.
| void verification_context::add_expectation | ( | PageID | pid, |
| int16_t | level, | ||
| bool | high, | ||
| size_t | prefix_len, | ||
| const char * | prefix, | ||
| size_t | suffix_len, | ||
| const char * | suffix | ||
| ) |
for the case the string consists of two parts (prefix and suffix).
|
inline |
overload for w_keystr_t.
|
inline |
flips a bit corresponding to the specified fact.
| void verification_context::add_fact | ( | PageID | pid, |
| int16_t | level, | ||
| bool | high, | ||
| size_t | prefix_len, | ||
| const char * | prefix, | ||
| size_t | suffix_len, | ||
| const char * | suffix | ||
| ) |
for the case the string consists of two parts (prefix and suffix).
|
inline |
overload for w_keystr_t.
| bool verification_context::is_bitmap_clean | ( | ) | const |
Returns if all bitmap entries are zero, implying that the BTree is consistent.
| char* verification_context::_bitmap |
bitmap to be flipped for each fact we collect.
| int verification_context::_bitmap_size |
byte length of _bitmap. should be multiply of 8 to make checking efficient.
| const int verification_context::_hash_bits |
the number of bits we use for hashing.
| int verification_context::_pages_checked |
count of pages checked so far, for reporting purpose only.
| int verification_context::_pages_inconsistent |
count of pages that had in-page inconsistency.
1.8.12