libfoedus-core
FOEDUS Core Library
|
Represents a minimal information to install a new snapshot page pointer. More...
Represents a minimal information to install a new snapshot page pointer.
Definition at line 259 of file masstree_composer_impl.hpp.
#include <masstree_composer_impl.hpp>
Public Member Functions | |
PageBoundaryInfo ()=delete | |
This object must be reinterpreted. More... | |
~PageBoundaryInfo ()=delete | |
uint32_t | dynamic_sizeof () const __attribute__((always_inline)) |
SnapshotLocalPageId | get_local_page_id () const __attribute__((always_inline)) |
bool | exact_match (uint8_t btree_level, uint8_t layer, const KeySlice *prefixes, KeySlice low, KeySlice high) const __attribute__((always_inline)) |
returns whether the entry exactly matches with the page boundaries we look for. More... | |
Static Public Member Functions | |
static uint32_t | calculate_hash (uint8_t btree_level, uint8_t layer, const KeySlice *prefixes, KeySlice low_fence, KeySlice high_fence) __attribute__((always_inline)) |
Public Attributes | |
uint8_t | btree_level_ |
B-tree level. More... | |
uint8_t | removed_ |
set to true when this page is closed/reopened so that only one entry matches exactly More... | |
uint8_t | layer_ |
B-trie layer of the new page. More... | |
uint8_t | local_snapshot_pointer_high_ |
high 8-bits of SnapshotLocalPageId of the new page. More... | |
uint32_t | local_snapshot_pointer_low_ |
low 32-bits of SnapshotLocalPageId of the new page. More... | |
KeySlice | slices_ [2] |
actually of layer_+2. More... | |
|
delete |
This object must be reinterpreted.
Also, sizeof does not work.
|
delete |
|
inlinestatic |
Definition at line 292 of file masstree_composer_impl.hpp.
|
inline |
Definition at line 291 of file masstree_composer_impl.hpp.
|
inline |
returns whether the entry exactly matches with the page boundaries we look for.
There must be only one entry that exactly matches. To guarantee this, we have to remove an old entry when we close/re-open the same page during this execution. It should happen rarely (when flush_buffer() is called).
Definition at line 321 of file masstree_composer_impl.hpp.
References layer_.
|
inline |
Definition at line 309 of file masstree_composer_impl.hpp.
References local_snapshot_pointer_high_.
uint8_t foedus::storage::masstree::MasstreeComposeContext::PageBoundaryInfo::btree_level_ |
B-tree level.
Note that it IS possible that we have two pages with the exact same prefix and fences, but in different levels. We hit the case as a rare bug like this: This happens when the tail page of the growing level has only one pointer. eg. Btree-level-0 : A, B, ... E, F, ..., X, Y, Z. We had 26 pages. and we closed it. Now the B-tree level-1 replaces the last level, which usually has much coarser keys. HOWEVER, unluckily, it's like this: A-E, E-K, ... V-Y, ***Y-Z***. Here, the intermediate page Y-Z only has one pointer. In this case, both the level-0 page (Z) and the level-1 page has Y-Z as the range.
Definition at line 270 of file masstree_composer_impl.hpp.
uint8_t foedus::storage::masstree::MasstreeComposeContext::PageBoundaryInfo::layer_ |
B-trie layer of the new page.
layer_+2 slices are stored.
Definition at line 274 of file masstree_composer_impl.hpp.
Referenced by exact_match().
uint8_t foedus::storage::masstree::MasstreeComposeContext::PageBoundaryInfo::local_snapshot_pointer_high_ |
high 8-bits of SnapshotLocalPageId of the new page.
Definition at line 276 of file masstree_composer_impl.hpp.
Referenced by get_local_page_id().
uint32_t foedus::storage::masstree::MasstreeComposeContext::PageBoundaryInfo::local_snapshot_pointer_low_ |
low 32-bits of SnapshotLocalPageId of the new page.
Definition at line 278 of file masstree_composer_impl.hpp.
uint8_t foedus::storage::masstree::MasstreeComposeContext::PageBoundaryInfo::removed_ |
set to true when this page is closed/reopened so that only one entry matches exactly
Definition at line 272 of file masstree_composer_impl.hpp.
KeySlice foedus::storage::masstree::MasstreeComposeContext::PageBoundaryInfo::slices_[2] |
actually of layer_+2.
which is why sizeof does not work. slices_[0] to slices_[layer_-1] store prefix slices. slices_[layer_] is the low_fence, slices_[layer_+1] is the high fence of the new page.
Definition at line 285 of file masstree_composer_impl.hpp.