|
Zero
0.1.0
|
#include <btree.h>
Public Member Functions | |
| btree_m () | |
| ~btree_m () | |
| void | construct_once () |
| void | destruct_once () |
Static Public Member Functions | |
| static smsize_t | max_entry_size () |
| static rc_t | create (StoreID stid, PageID root) |
| static rc_t | insert (StoreID store, const w_keystr_t &key, const cvec_t &elem) |
| static rc_t | update (StoreID store, const w_keystr_t &key, const cvec_t &elem) |
| static rc_t | put (StoreID store, const w_keystr_t &key, const cvec_t &elem) |
| static rc_t | overwrite (StoreID store, const w_keystr_t &key, const char *el, smsize_t offset, smsize_t elen) |
| static rc_t | remove (StoreID store, const w_keystr_t &key) |
| static void | print (const PageID &root, bool print_elem=true) |
| static rc_t | touch_all (StoreID stid, uint64_t &page_count) |
| static rc_t | touch (const btree_page_h &page, uint64_t &page_count) |
| static rc_t | defrag_page (btree_page_h &page) |
| Defrags the given page to remove holes and ghost records in the page. More... | |
| static rc_t | lookup (StoreID store, const w_keystr_t &key_to_find, void *el, smsize_t &elen, bool &found) |
| static rc_t | get_du_statistics (const PageID &root_pid, btree_stats_t &btree_stats, bool audit) |
| static rc_t | verify_tree (StoreID store, int hash_bits, bool &consistent) |
| static rc_t | verify_volume (int hash_bits, verify_volume_result &result) |
| Verifies consistency of all BTree indexes in the volume. More... | |
Static Protected Member Functions | |
| static rc_t | remove_as_undo (StoreID store, const w_keystr_t &key) |
| static rc_t | update_as_undo (StoreID store, const w_keystr_t &key, const cvec_t &elem) |
| static rc_t | overwrite_as_undo (StoreID store, const w_keystr_t &key, const char *el, smsize_t offset, smsize_t elen) |
| static rc_t | undo_ghost_mark (StoreID store, const w_keystr_t &key) |
Static Private Member Functions | |
| static rc_t | is_empty (StoreID store, bool &ret) |
| static rc_t | _get_du_statistics_recurse (const PageID ¤tpid, btree_stats_t &_stats, base_stat_t &lf_cnt, base_stat_t &int_cnt, btree_lf_stats_t &lf_stats, btree_int_stats_t &int_stats, bool audit) |
Friends | |
| class | btree_page_h |
| class | btree_impl |
| class | bt_cursor_t |
| class | btree_remove_log |
| class | btree_insert_log |
| class | btree_insert_nonghost_log |
| class | btree_update_log |
| class | btree_overwrite_log |
| class | btree_ghost_mark_log |
| class | btree_ghost_reclaim_log |
Data access API for B+Tree.
|
inline |
|
inline |
|
staticprivate |
Used by get_du_statistics internally to collect all nodes' statistics.
| void btree_m::construct_once | ( | ) |
Create a btree. Return the root page id in root.
| void btree_m::destruct_once | ( | ) |
|
static |
|
static |
Insert <key, el> into the btree.
Return true in ret if btree at root is empty. false otherwise.
|
static |
Find key in btree. If found, copy up to elen bytes of the entry element into el.
|
static |
|
static |
Update specific part of el of key with the new data.
|
staticprotected |
|
static |
Print the btree (for debugging only).
|
static |
Put <key, el> into the btree; if key didn't exist, inserts it, otherwise updates el of key with the new data.
|
static |
Remove key from the btree.
|
staticprotected |
|
static |
Touch all pages in the btree (for performance experiments).
|
staticprotected |
|
static |
Update el of key with the new data.
|
staticprotected |
Verifies the integrity of whole tree using the fence-key bitmap technique. This method constructs a bitmap, traverses all pages in this BTree and flips each bit based on facts collected from each page. The size of bitmap is 2^hash_bits bits = 2^(hash_bits - 3) bytes. We recommend hash_bits to be around 20. For more details of this algorithm, check out TODS'11 paper. Context: in both user and system transaction.
| [in] | store | Store ID |
| [in] | hash_bits | the number of bits we use for hashing, at most 31. |
| [out] | consistent | whether the BTree is consistent |
|
static |
Verifies consistency of all BTree indexes in the volume.
Unlike verify_index() this method sequentially scans all pages in this volume to efficiently conduct the batch-verification. However, you cannot have concurrent update operations while you are running this verification. It might cause deadlocks! To allow concurrent transaction while verifying, consider using _ux_verify_tree().
| [in] | hash_bits | the number of bits we use for hashing per BTree, at most 31. |
| [out] | result | Results of the verification. |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
1.8.12