libfoedus-core
FOEDUS Core Library
|
Metadata of a masstree storage. More...
Metadata of a masstree storage.
Definition at line 41 of file masstree_metadata.hpp.
#include <masstree_metadata.hpp>
Public Types | |
enum | Constants { kDefaultDropVolatilePagesBtreeLevels = 3 } |
Public Member Functions | |
MasstreeMetadata () | |
MasstreeMetadata (StorageId id, const StorageName &name, uint16_t border_early_split_threshold=0, uint16_t snapshot_drop_volatile_pages_layer_threshold=0, uint16_t snapshot_drop_volatile_pages_btree_levels=kDefaultDropVolatilePagesBtreeLevels, Layer min_layer_hint=0) | |
MasstreeMetadata (const StorageName &name, uint16_t border_early_split_threshold=0, uint16_t snapshot_drop_volatile_pages_layer_threshold=0, uint16_t snapshot_drop_volatile_pages_btree_levels=kDefaultDropVolatilePagesBtreeLevels, Layer min_layer_hint=0) | |
This one is for newly creating a storage. More... | |
std::string | describe () const |
bool | should_aggresively_create_next_layer (Layer cur_layer, KeyLength remainder) const |
![]() | |
Metadata () | |
Metadata (StorageId id, StorageType type, const StorageName &name) | |
Metadata (StorageId id, StorageType type, const StorageName &name, SnapshotPagePointer root_snapshot_page_id) | |
bool | keeps_all_volatile_pages () const |
Public Attributes | |
uint16_t | border_early_split_threshold_ |
Kind of fill factor for border pages, bit different from usual B-tree. More... | |
uint16_t | snapshot_drop_volatile_pages_layer_threshold_ |
Number of B-trie layers of volatile pages to keep after each snapshotting. More... | |
uint16_t | snapshot_drop_volatile_pages_btree_levels_ |
Volatile pages of this B-tree level or higher are always kept after each snapshotting. More... | |
Layer | min_layer_hint_ |
Hints how many layers this storage will create for most of records. More... | |
uint8_t | pad1_ |
![]() | |
StorageId | id_ |
the unique ID of this storage. More... | |
StorageType | type_ |
type of the storage. More... | |
StorageName | name_ |
the unique name of this storage. More... | |
SnapshotPagePointer | root_snapshot_page_id_ |
Pointer to a snapshotted page this storage is rooted at. More... | |
SnapshotThresholds | snapshot_thresholds_ |
Friends | |
std::ostream & | operator<< (std::ostream &o, const MasstreeMetadata &v) |
Additional Inherited Members | |
![]() | |
static std::string | describe (const Metadata &metadata) |
to_string operator of all Metadata objects. More... | |
Enumerator | |
---|---|
kDefaultDropVolatilePagesBtreeLevels |
Definition at line 42 of file masstree_metadata.hpp.
|
inline |
Definition at line 45 of file masstree_metadata.hpp.
|
inline |
Definition at line 52 of file masstree_metadata.hpp.
|
inline |
This one is for newly creating a storage.
Definition at line 67 of file masstree_metadata.hpp.
std::string foedus::storage::masstree::MasstreeMetadata::describe | ( | ) | const |
Definition at line 29 of file masstree_metadata.cpp.
|
inline |
Definition at line 132 of file masstree_metadata.hpp.
|
friend |
Definition at line 34 of file masstree_metadata.cpp.
uint16_t foedus::storage::masstree::MasstreeMetadata::border_early_split_threshold_ |
Kind of fill factor for border pages, bit different from usual B-tree.
Border pages split without being full when a border page seems to receive sequential inserts and the physical key count will exactly hit this value. Once it passes this value, it goes on until it really becomes full (otherwise there is no point.. the border pages keep splitting without necessity). When the page is not receiving sequential inserts, there are also no points to split early. The default is 0, which means we never consider early split.
Definition at line 94 of file masstree_metadata.hpp.
Referenced by foedus::storage::masstree::MasstreeMetadataSerializer::load(), and foedus::storage::masstree::MasstreeMetadataSerializer::save().
Layer foedus::storage::masstree::MasstreeMetadata::min_layer_hint_ |
Hints how many layers this storage will create for most of records.
0 is the default, which does nothing. n (n>0) hints that most records in this storage will be stored in layer-n or deeper, thus we should blindly create an initially next-layer record in layer-(n-1) and above as far as the length of the key allows.
If appropriately specified, this reduces contention and wasted space in layer-(n-1) and above. If you specify too large min_layer_hint_, it might slow down searches because the record could otherwise fit in layer-(n-1) or above.
Definition at line 126 of file masstree_metadata.hpp.
Referenced by foedus::storage::masstree::MasstreeMetadataSerializer::load(), and foedus::storage::masstree::MasstreeMetadataSerializer::save().
uint8_t foedus::storage::masstree::MasstreeMetadata::pad1_ |
Definition at line 129 of file masstree_metadata.hpp.
uint16_t foedus::storage::masstree::MasstreeMetadata::snapshot_drop_volatile_pages_btree_levels_ |
Volatile pages of this B-tree level or higher are always kept after each snapshotting.
0 means we don't drop any volatile pages. 1 means we drop only border pages. Note that this and snapshot_drop_volatile_pages_layer_threshold_ are AND conditions, meaning we drop volatile pages that meet both conditions. Further, we anyway don't drop volatile pages that have modifications after the snapshot epoch. The default is kDefaultDropVolatilePagesBtreeLevels.
Definition at line 112 of file masstree_metadata.hpp.
Referenced by foedus::storage::masstree::MasstreeMetadataSerializer::load(), and foedus::storage::masstree::MasstreeMetadataSerializer::save().
uint16_t foedus::storage::masstree::MasstreeMetadata::snapshot_drop_volatile_pages_layer_threshold_ |
Number of B-trie layers of volatile pages to keep after each snapshotting.
0 means this storage drops volatile pages even if it's in the first layer. 1 means it keeps all pages in first layer. The default is 0.
Definition at line 102 of file masstree_metadata.hpp.
Referenced by foedus::storage::masstree::MasstreeMetadataSerializer::load(), and foedus::storage::masstree::MasstreeMetadataSerializer::save().