libfoedus-core
FOEDUS Core Library
|
Masstree Storage, 64-bit B-tries with internal B-trees. More...
Masstree Storage, 64-bit B-tries with internal B-trees.
Although the package name says masstree [YANDONG12], we call our implementation Master-Tree. There are a few differences from the original Masstree.
See our paper (lame, yes).
Througout our code, we always use the word remainder rather than remaining-key. In [YANDONG12] and [TU13], the word remaining-key meant the leftover of the entire key after removing the common prefixes in previous B-trie layers. For example, key "abcd" has remaining key "abcd" in layer-0. key "abcd12345678" has remaining keys "abcd12345678" in layer-0 and "5678" in layer-1. When the length of remaining-key is more than 8-bytes, the page also stores suffix, which is the key part after the slice in the layer. For example, "abcd12345678" stores "5678" as suffix in layer-0 while no suffix in layer-1.
Up to here, there is no difference between remainder and remaining-key. Actually, in most cases they are exactly the same.
They differ only when a record points to next layer. In the original papers/codes, the length of remaining-key is set to be 255 when the record now points to next layer, and they also overwrite the area to store suffix with next-page pointer.
In Master-Tree, we always keep the remainder even when now it points to the next layer. This simplifies many concurrency control issues, especially our foster-twin tracking algorithm. Therefore, we never change the length of remainder. It's an immutable property of the record. Instead, we have an additional mutable boolean flag "next_layer" in TID. Whether the next_layer flag is ON or OFF, all threads are safe to access the remainder. The commit protocol checks the flag and aborts if it's unexpectedly ON.
This is just a subtle difference, but allthemore subtle, it's confusing! Hence, we use a different word, remainder. Below we summarize the differences:
. | Remaining Key (Mass-Tree) | Remainder (Master-Tree) |
---|---|---|
Length | Full key length - layer*8 if not next-layer, 255 if it's now next-layer. | Full key length - layer*8 always. Keeps the original remainder length. |
Suffix stored at | The beginning of data region if not next-layer, overwritten if it's now next-layer. | The beginning of data region always. Keeps the original remainder. |
Length 0xFFFF means | The record is now next-layer, so the record has no suffix-region. HOWEVER, concurrent threads must be careful because it was not 0xFFFF before. | The record was initially next-layer as of creation, so the record has no suffix-region. Such a record is never moved. A record that later turned to be next-layer doesn't use this value. |
Classes | |
struct | Adopt |
A system transaction to adopt foster twins into an intermediate page. More... | |
struct | GrowFirstLayerRoot |
A system transaction to grow a first-layer root. More... | |
struct | GrowNonFirstLayerRoot |
A system transaction to grow a second- or depper-layer root. More... | |
struct | HighFence |
Used only for debugging as this is not space efficient. More... | |
class | MasstreeBorderPage |
Represents one border page in Masstree Storage. More... | |
struct | MasstreeCommonLogType |
A base class for MasstreeInsertLogType/MasstreeDeleteLogType/MasstreeOverwriteLogType. More... | |
class | MasstreeComposeContext |
MasstreeComposer's compose() implementation separated from the class itself. More... | |
class | MasstreeComposer |
Composer for an masstree storage. More... | |
struct | MasstreeCreateLogType |
Log type of CREATE MASSTREE STORAGE operation. More... | |
class | MasstreeCursor |
Represents a cursor object for Masstree storage. More... | |
struct | MasstreeDeleteLogType |
Log type of masstree-storage's delete operation. More... | |
struct | MasstreeInsertLogType |
Log type of masstree-storage's insert operation. More... | |
class | MasstreeIntermediatePage |
Represents one intermediate page in Masstree Storage. More... | |
struct | MasstreeIntermediatePointerIterator |
Handy iterator for MasstreeIntermediate. More... | |
struct | MasstreeMetadata |
Metadata of a masstree storage. More... | |
struct | MasstreeMetadataSerializer |
struct | MasstreeOverwriteLogType |
Log type of masstree-storage's overwrite operation. More... | |
class | MasstreePage |
Common base of MasstreeIntermediatePage and MasstreeBorderPage. More... | |
class | MasstreePartitioner |
Partitioner for a masstree storage. More... | |
struct | MasstreePartitionerData |
Dynamic information of one partitioner. More... | |
class | MasstreeStorage |
Represents a Masstree storage. More... | |
struct | MasstreeStorageControlBlock |
Shared data of this storage type. More... | |
class | MasstreeStoragePimpl |
Pimpl object of MasstreeStorage. More... | |
struct | MasstreeUpdateLogType |
Log type of masstree-storage's update operation. More... | |
struct | OwnerSamples |
Number of vol pages in each node sampled per pointer in the root page. More... | |
struct | RecordLocation |
return value of MasstreeStoragePimpl::locate_record()/reserve_record(). More... | |
struct | ReserveRecords |
A system transaction to reserve a physical record(s) in a border page. More... | |
struct | SortEntry |
Unlike array's sort entry, we don't always use this because keys are arbitrary lengthes. More... | |
struct | SplitBorder |
A system transaction to split a border page in Master-Tree. More... | |
struct | SplitIntermediate |
A system transaction to split an intermediate page in Master-Tree. More... | |
Typedefs | |
typedef uint8_t | Layer |
Represents the depth of a B-trie layer. More... | |
typedef uint8_t | InLayerLevel |
Represents the depth of a B-tree node in a B-trie layer. More... | |
typedef uint16_t | KeyLength |
Represents a byte-length of a key in this package. More... | |
typedef uint16_t | PayloadLength |
Represents a byte-length of a payload in this package. More... | |
typedef uint16_t | DataOffset |
Byte-offset in a page. More... | |
typedef uint16_t | SlotIndex |
Index of a record in a (border) page. More... | |
typedef uint64_t | KeySlice |
Each key slice is an 8-byte integer. More... | |
Functions | |
template<typename T > | |
KeySlice | normalize_primitive (T value) |
Order-preserving normalization for primitive key types. More... | |
template<typename T > | |
T | denormalize_primitive (KeySlice value) |
Opposite of normalize_primitive(). More... | |
KeySlice | normalize_be_bytes_full_aligned (const void *be_bytes) |
Convert an aligned big-endian byte array of at least 8-bytes-length to KeySlice. More... | |
KeySlice | normalize_be_bytes_full (const void *be_bytes) |
Convert a big-endian byte array of at least 8-bytes-length to KeySlice. More... | |
KeySlice | normalize_be_bytes_fragment (const void *be_bytes, uint32_t length) |
Convert a big-endian byte array of given length to KeySlice. More... | |
KeySlice | slice_key (const void *be_bytes, KeyLength slice_length) |
Extract a part of a big-endian byte array of given length as KeySlice. More... | |
KeySlice | slice_layer (const void *be_bytes, KeyLength key_length, Layer current_layer) |
Extract a part of a big-endian byte array of given length as KeySlice. More... | |
uint16_t | count_common_slices (const void *left, const void *right, uint16_t max_slices) |
Returns the number of 8-byte slices that the two strings share as prefix. More... | |
bool | is_key_aligned_and_zero_padded (const char *key, KeyLength key_length) |
Returns if the given key is 8-bytes aligned and also zero-padded to 8-bytes for easier slicing (which most of our code does). More... | |
uint8_t | extract_page_layer (const void *in_page_pointer) |
Retrieve masstree layer information from the header of the page that contains the pointer. More... | |
KeyLength | calculate_suffix_length (KeyLength remainder_length) __attribute__((always_inline)) |
KeyLength | calculate_suffix_length_aligned (KeyLength remainder_length) __attribute__((always_inline)) |
void | _dummy_static_size_check__COUNTER__ () |
int | compare_keys (const char *left, uint16_t left_length, const char *right, uint16_t right_length) |
Local utility functions. More... | |
const MasstreeCommonLogType * | resolve_log (const snapshot::LogBuffer &log_buffer, snapshot::BufferPosition pos) |
void | fill_payload_padded (char *destination, const char *source, PayloadLength count) |
MasstreeBorderPage * | as_border (MasstreePage *page) |
MasstreeIntermediatePage * | as_intermediate (MasstreePage *page) |
bool | from_this_snapshot (SnapshotPagePointer pointer, const Composer::ConstructRootArguments &args) |
std::ostream & | operator<< (std::ostream &o, const MasstreeComposeContext::PathLevel &v) |
void | copy_input_key (const char *input_key, KeyLength length, char *buffer, KeySlice *slice_buffer) |
void | grow_case_a_common (thread::Thread *context, DualPagePointer *pointer, MasstreePage *cur_root) |
ErrorCode | grow_case_b_common (thread::Thread *context, DualPagePointer *pointer, MasstreePage *cur_root) |
std::ostream & | operator<< (std::ostream &o, const MasstreeCreateLogType &v) |
std::ostream & | operator<< (std::ostream &o, const MasstreeInsertLogType &v) |
std::ostream & | operator<< (std::ostream &o, const MasstreeDeleteLogType &v) |
std::ostream & | operator<< (std::ostream &o, const MasstreeUpdateLogType &v) |
std::ostream & | operator<< (std::ostream &o, const MasstreeOverwriteLogType &v) |
std::ostream & | operator<< (std::ostream &o, const MasstreeMetadata &v) |
std::ostream & | operator<< (std::ostream &o, const MasstreePage &v) |
void | describe_masstree_page_common (std::ostream *o_ptr, const MasstreePage &v) |
std::ostream & | operator<< (std::ostream &o, const MasstreeIntermediatePage &v) |
std::ostream & | operator<< (std::ostream &o, const MasstreeBorderPage &v) |
void | release_parallel (Engine *engine, VolatilePagePointer pointer) |
void | design_partition_first_parallel_recurse (const memory::GlobalVolatilePageResolver &resolver, const MasstreePage *page, uint32_t subtree_id, OwnerSamples *result, assorted::UniformRandom *unirand) |
void | design_partition_first_parallel (Engine *engine, VolatilePagePointer subtree, uint32_t subtree_id, OwnerSamples *result) |
std::ostream & | operator<< (std::ostream &o, const OwnerSamples &v) |
void | retrieve_positions (uint32_t logs_count, const SortEntry *entries, snapshot::BufferPosition *out) |
subroutine of sort_batch_8bytes More... | |
void | prepare_sort_entries (const Partitioner::SortBatchArguments &args, SortEntry *entries) |
subroutine of sort_batch_8bytes More... | |
std::ostream & | operator<< (std::ostream &o, const MasstreePartitioner &v) |
xct::XctId | get_initial_xid () |
MasstreeBorderPage * | allocate_new_border_page (thread::Thread *context) |
std::ostream & | operator<< (std::ostream &o, const MasstreeStorage &v) |
PayloadLength | adjust_payload_hint (PayloadLength payload_count, PayloadLength physical_payload_hint) |
uint32_t | count_children_approximate (const MasstreeIntermediatePage *page) |
ErrorStack | verify_page_basic (thread::Thread *context, MasstreePage *page, PageType page_type, KeySlice low_fence, HighFence high_fence) |
Variables | |
const Layer | kMaxLayer = 63U |
Maximum value for Layer. More... | |
const InLayerLevel | kMaxSaneInLayerLevel = 15U |
If InLayerLevel exceeds this value, there must be something wrong. More... | |
const KeyLength | kMaxKeyLength = 1024U |
Max length of a key. More... | |
const KeyLength | kInitiallyNextLayer = 0xFFFFU |
A special key length value that denotes the record in a border page was initially a next-layer pointer, thus the record has no suffix region. More... | |
const PayloadLength | kMaxPayloadLength = 1024U |
Max length of a payload. More... | |
const uint64_t | kSliceLen = sizeof(KeySlice) |
Shorthand for sizeof(KeySlice). More... | |
const KeySlice | kInfimumSlice = 0 |
const KeySlice | kSupremumSlice = 0xFFFFFFFFFFFFFFFFULL |
const uint32_t | kCommonPageHeaderSize = 80U |
Size of the base page class (MasstreePage), which is the common header for intermediate and border pages placed at the beginning. More... | |
const uint32_t | kBorderPageAdditionalHeaderSize = 8U |
Misc header attributes specific to MasstreeBorderPage placed after the common header. More... | |
const uint32_t | kBorderPageSlotSize = 32U |
Byte size of one slot in MasstreeBorderPage excluding slice information. More... | |
const SlotIndex | kBorderPageMaxSlots |
Maximum number of slots in one MasstreeBorderPage. More... | |
const uint32_t | kBorderPageDataPartSize |
Byte size of the record data part (data_) in MasstreeBorderPage. More... | |
const DataOffset | kBorderPageDataPartOffset |
Offset of data_ member in MasstreeBorderPage. More... | |
const uint16_t | kMaxIntermediateSeparators = 9U |
Max number of separators stored in the first level of intermediate pages. More... | |
const uint16_t | kMaxIntermediateMiniSeparators = 15U |
Max number of separators stored in the second level of intermediate pages. More... | |
const uint32_t | kMaxIntermediatePointers = (kMaxIntermediateSeparators + 1U) * (kMaxIntermediateMiniSeparators + 1U) |
Max number of pointers (if completely filled) stored in an intermediate pages. More... | |
constexpr uint32_t | kIntermediateAlmostFull = kMaxIntermediatePointers * 9U / 10U |
|
inline |
Definition at line 1733 of file masstree_page_impl.hpp.
PayloadLength foedus::storage::masstree::adjust_payload_hint | ( | PayloadLength | payload_count, |
PayloadLength | physical_payload_hint | ||
) |
Definition at line 233 of file masstree_storage.cpp.
References foedus::assorted::align8(), ASSERT_ND, and kMaxPayloadLength.
Referenced by foedus::storage::masstree::MasstreeStorage::insert_record(), foedus::storage::masstree::MasstreeStorage::insert_record_normalized(), foedus::storage::masstree::MasstreeStorage::upsert_record(), and foedus::storage::masstree::MasstreeStorage::upsert_record_normalized().
|
inline |
Definition at line 39 of file masstree_reserve_impl.cpp.
References foedus::thread::Thread::get_local_volatile_page_resolver(), foedus::thread::Thread::get_numa_node(), foedus::thread::Thread::get_thread_memory(), foedus::memory::NumaCoreMemory::grab_free_volatile_page(), foedus::storage::masstree::MasstreePage::header(), foedus::storage::PageHeader::page_id_, foedus::storage::VolatilePagePointer::set(), and foedus::storage::VolatilePagePointer::word.
Referenced by foedus::storage::masstree::ReserveRecords::run().
|
inline |
Definition at line 56 of file masstree_composer_impl.cpp.
References ASSERT_ND, and foedus::storage::masstree::MasstreePage::is_border().
|
inline |
Definition at line 61 of file masstree_composer_impl.cpp.
References ASSERT_ND, and foedus::storage::masstree::MasstreePage::is_border().
Definition at line 1105 of file masstree_page_impl.hpp.
References ASSERT_ND, kInitiallyNextLayer, and kMaxKeyLength.
Referenced by calculate_suffix_length_aligned(), foedus::storage::masstree::MasstreeCursor::copy_combined_key(), foedus::storage::masstree::MasstreeCursor::copy_combined_key_part(), foedus::storage::masstree::MasstreeBorderPage::Slot::get_suffix_length(), foedus::storage::masstree::MasstreeBorderPage::get_suffix_length(), foedus::storage::masstree::SplitBorder::migrate_records(), and foedus::storage::masstree::MasstreeBorderPage::reserve_record_space().
|
inline |
Definition at line 1116 of file masstree_page_impl.hpp.
References foedus::assorted::align8(), and calculate_suffix_length().
Referenced by foedus::storage::masstree::MasstreeBorderPage::Slot::get_aligned_suffix_length(), foedus::storage::masstree::MasstreeBorderPage::get_record_payload_from_offsets(), foedus::storage::masstree::MasstreeBorderPage::get_suffix_length_aligned(), foedus::storage::masstree::MasstreeBorderPage::initialize_layer_root(), and foedus::storage::masstree::MasstreeBorderPage::to_record_length().
|
inline |
Local utility functions.
Used in partitioner and composer.Returns negative, 0, positive if left<right, left==right, left>right.
Definition at line 203 of file masstree_partitioner_impl.hpp.
void foedus::storage::masstree::copy_input_key | ( | const char * | input_key, |
KeyLength | length, | ||
char * | buffer, | ||
KeySlice * | slice_buffer | ||
) |
Definition at line 925 of file masstree_cursor.cpp.
References ASSUME_ALIGNED, and slice_key().
Referenced by foedus::storage::masstree::MasstreeCursor::open().
uint32_t foedus::storage::masstree::count_children_approximate | ( | const MasstreeIntermediatePage * | page | ) |
Definition at line 32 of file masstree_storage_fatify.cpp.
References foedus::storage::masstree::MasstreePage::get_key_count(), foedus::storage::masstree::MasstreeIntermediatePage::get_minipage(), and foedus::storage::masstree::MasstreeIntermediatePage::MiniPage::key_count_.
Referenced by foedus::storage::masstree::MasstreeStoragePimpl::approximate_count_root_children(), and foedus::storage::masstree::MasstreeStoragePimpl::fatify_first_root_double().
void foedus::storage::masstree::describe_masstree_page_common | ( | std::ostream * | o_ptr, |
const MasstreePage & | v | ||
) |
Definition at line 39 of file masstree_page_debug.cpp.
References foedus::storage::describe_volatile_pointer(), foedus::storage::masstree::MasstreePage::get_foster_fence(), foedus::storage::masstree::MasstreePage::get_foster_major(), foedus::storage::masstree::MasstreePage::get_foster_minor(), foedus::storage::masstree::MasstreePage::get_high_fence(), foedus::storage::masstree::MasstreePage::get_low_fence(), and foedus::storage::masstree::MasstreePage::header().
Referenced by operator<<().
void foedus::storage::masstree::design_partition_first_parallel | ( | Engine * | engine, |
VolatilePagePointer | subtree, | ||
uint32_t | subtree_id, | ||
OwnerSamples * | result | ||
) |
Definition at line 155 of file masstree_partitioner_impl.cpp.
References ASSERT_ND, design_partition_first_parallel_recurse(), foedus::debugging::StopWatch::elapsed_us(), foedus::memory::EngineMemory::get_global_volatile_page_resolver(), foedus::Engine::get_memory_manager(), foedus::memory::GlobalVolatilePageResolver::resolve_offset(), and foedus::debugging::StopWatch::stop().
void foedus::storage::masstree::design_partition_first_parallel_recurse | ( | const memory::GlobalVolatilePageResolver & | resolver, |
const MasstreePage * | page, | ||
uint32_t | subtree_id, | ||
OwnerSamples * | result, | ||
assorted::UniformRandom * | unirand | ||
) |
Definition at line 124 of file masstree_partitioner_impl.cpp.
References foedus::storage::masstree::MasstreePage::header(), foedus::storage::masstree::OwnerSamples::increment(), foedus::storage::masstree::MasstreePage::is_border(), foedus::storage::VolatilePagePointer::is_null(), foedus::storage::masstree::MasstreeIntermediatePage::MiniPage::key_count_, foedus::assorted::UniformRandom::next_uint32(), foedus::storage::masstree::MasstreeIntermediatePage::MiniPage::pointers_, foedus::memory::GlobalVolatilePageResolver::resolve_offset(), foedus::storage::PageHeader::stat_last_updater_node_, and foedus::storage::DualPagePointer::volatile_pointer_.
Referenced by design_partition_first_parallel().
|
inline |
Retrieve masstree layer information from the header of the page that contains the pointer.
We initially stored layer information in the log, but that might be incorrect when someone moves the record to next layer between log creation and record locking, so we now extract it in apply_record().
Definition at line 72 of file masstree_log_types.hpp.
References foedus::storage::Page::get_header(), foedus::storage::PageHeader::masstree_layer_, and foedus::storage::to_page().
Referenced by foedus::storage::masstree::MasstreeCommonLogType::apply_record_prepare(), and foedus::storage::masstree::MasstreeCommonLogType::equal_record_and_log_suffixes().
|
inline |
Definition at line 48 of file masstree_composer_impl.cpp.
References foedus::assorted::align8(), ASSERT_ND, and is_key_aligned_and_zero_padded().
bool foedus::storage::masstree::from_this_snapshot | ( | SnapshotPagePointer | pointer, |
const Composer::ConstructRootArguments & | args | ||
) |
Definition at line 102 of file masstree_composer_impl.cpp.
References ASSERT_ND, foedus::storage::extract_snapshot_id_from_snapshot_pointer(), foedus::snapshot::SnapshotWriter::get_snapshot_id(), foedus::snapshot::kNullSnapshotId, and foedus::storage::Composer::ConstructRootArguments::snapshot_writer_.
Referenced by foedus::storage::masstree::MasstreeComposer::construct_root().
|
inline |
Definition at line 31 of file masstree_reserve_impl.cpp.
References foedus::Epoch::kEpochInitialCurrent, and foedus::xct::XctId::set().
Referenced by foedus::storage::masstree::ReserveRecords::run().
void foedus::storage::masstree::grow_case_a_common | ( | thread::Thread * | context, |
DualPagePointer * | pointer, | ||
MasstreePage * | cur_root | ||
) |
Definition at line 36 of file masstree_grow_impl.cpp.
References ASSERT_ND, foedus::thread::Thread::collect_retired_volatile_page(), foedus::storage::masstree::MasstreePage::get_foster_fence(), foedus::storage::masstree::MasstreePage::get_foster_major(), foedus::storage::masstree::MasstreePage::get_foster_minor(), foedus::thread::Thread::get_global_volatile_page_resolver(), foedus::storage::masstree::MasstreePage::get_high_fence(), foedus::storage::masstree::MasstreePage::get_low_fence(), foedus::storage::masstree::MasstreePage::get_version_address(), foedus::storage::masstree::MasstreePage::get_volatile_page_id(), foedus::storage::masstree::MasstreePage::header(), foedus::storage::masstree::MasstreePage::is_empty_range(), foedus::storage::masstree::MasstreePage::is_locked(), foedus::storage::PageVersionStatus::kRetiredBit, foedus::storage::masstree::MasstreePage::set_retired(), foedus::storage::PageHeader::snapshot_, foedus::storage::PageVersionStatus::status_, foedus::storage::PageVersion::status_, and foedus::storage::DualPagePointer::volatile_pointer_.
Referenced by foedus::storage::masstree::GrowFirstLayerRoot::run(), and foedus::storage::masstree::GrowNonFirstLayerRoot::run().
ErrorCode foedus::storage::masstree::grow_case_b_common | ( | thread::Thread * | context, |
DualPagePointer * | pointer, | ||
MasstreePage * | cur_root | ||
) |
Definition at line 76 of file masstree_grow_impl.cpp.
References ASSERT_ND, foedus::thread::Thread::collect_retired_volatile_page(), foedus::storage::masstree::MasstreePage::get_btree_level(), foedus::storage::masstree::MasstreePage::get_foster_fence(), foedus::storage::masstree::MasstreePage::get_foster_major(), foedus::storage::masstree::MasstreePage::get_foster_minor(), foedus::thread::Thread::get_global_volatile_page_resolver(), foedus::storage::masstree::MasstreePage::get_layer(), foedus::storage::masstree::MasstreeIntermediatePage::get_minipage(), foedus::thread::Thread::get_thread_memory(), foedus::storage::masstree::MasstreePage::get_volatile_page_id(), foedus::memory::NumaCoreMemory::grab_free_volatile_page_pointer(), foedus::storage::masstree::MasstreePage::header(), foedus::storage::masstree::MasstreeIntermediatePage::initialize_volatile_page(), foedus::storage::masstree::MasstreePage::is_locked(), foedus::storage::VolatilePagePointer::is_null(), foedus::kErrorCodeMemoryNoFreePages, foedus::kErrorCodeOk, foedus::storage::PageHeader::key_count_, foedus::storage::masstree::MasstreeIntermediatePage::MiniPage::key_count_, kInfimumSlice, kSupremumSlice, foedus::assorted::memory_fence_release(), foedus::storage::masstree::MasstreePage::set_retired(), foedus::storage::PageHeader::storage_id_, and foedus::storage::DualPagePointer::volatile_pointer_.
Referenced by foedus::storage::masstree::GrowFirstLayerRoot::run(), and foedus::storage::masstree::GrowNonFirstLayerRoot::run().
std::ostream& foedus::storage::masstree::operator<< | ( | std::ostream & | o, |
const MasstreePage & | v | ||
) |
Definition at line 30 of file masstree_page_debug.cpp.
References foedus::storage::masstree::MasstreePage::is_border().
std::ostream& foedus::storage::masstree::operator<< | ( | std::ostream & | o, |
const MasstreeMetadata & | v | ||
) |
Definition at line 34 of file masstree_metadata.cpp.
std::ostream& foedus::storage::masstree::operator<< | ( | std::ostream & | o, |
const MasstreeCreateLogType & | v | ||
) |
Definition at line 50 of file masstree_log_types.cpp.
References foedus::storage::masstree::MasstreeCreateLogType::metadata_.
std::ostream& foedus::storage::masstree::operator<< | ( | std::ostream & | o, |
const MasstreeIntermediatePage & | v | ||
) |
Definition at line 54 of file masstree_page_debug.cpp.
References describe_masstree_page_common(), foedus::storage::masstree::MasstreePage::get_key_count(), foedus::storage::masstree::MasstreePage::get_low_fence(), foedus::storage::masstree::MasstreeIntermediatePage::get_minipage(), foedus::storage::masstree::MasstreeIntermediatePage::get_separator(), foedus::storage::masstree::MasstreePage::is_empty_range(), foedus::storage::masstree::MasstreeIntermediatePage::MiniPage::key_count_, foedus::storage::masstree::MasstreeIntermediatePage::MiniPage::pointers_, and foedus::storage::masstree::MasstreeIntermediatePage::MiniPage::separators_.
std::ostream& foedus::storage::masstree::operator<< | ( | std::ostream & | o, |
const MasstreeInsertLogType & | v | ||
) |
Definition at line 55 of file masstree_log_types.cpp.
References foedus::storage::masstree::MasstreeCommonLogType::get_key(), foedus::storage::masstree::MasstreeCommonLogType::get_payload(), foedus::storage::masstree::MasstreeCommonLogType::key_length_, and foedus::storage::masstree::MasstreeCommonLogType::payload_count_.
std::ostream& foedus::storage::masstree::operator<< | ( | std::ostream & | o, |
const MasstreeDeleteLogType & | v | ||
) |
Definition at line 65 of file masstree_log_types.cpp.
References foedus::storage::masstree::MasstreeCommonLogType::get_key(), and foedus::storage::masstree::MasstreeCommonLogType::key_length_.
std::ostream& foedus::storage::masstree::operator<< | ( | std::ostream & | o, |
const MasstreeStorage & | v | ||
) |
Definition at line 71 of file masstree_storage.cpp.
References foedus::storage::Storage< CONTROL_BLOCK >::get_id(), and foedus::storage::Storage< CONTROL_BLOCK >::get_name().
std::ostream& foedus::storage::masstree::operator<< | ( | std::ostream & | o, |
const MasstreeUpdateLogType & | v | ||
) |
Definition at line 73 of file masstree_log_types.cpp.
References foedus::storage::masstree::MasstreeCommonLogType::get_key(), foedus::storage::masstree::MasstreeCommonLogType::get_payload(), foedus::storage::masstree::MasstreeCommonLogType::key_length_, and foedus::storage::masstree::MasstreeCommonLogType::payload_count_.
std::ostream& foedus::storage::masstree::operator<< | ( | std::ostream & | o, |
const MasstreeBorderPage & | v | ||
) |
Definition at line 80 of file masstree_page_debug.cpp.
References foedus::storage::masstree::MasstreeBorderPage::SlotLengthUnion::components, describe_masstree_page_common(), foedus::storage::masstree::MasstreeBorderPage::does_point_to_layer(), foedus::storage::masstree::MasstreePage::get_key_count(), foedus::storage::masstree::MasstreeBorderPage::get_next_layer(), foedus::storage::masstree::MasstreeBorderPage::get_offset_in_bytes(), foedus::storage::masstree::MasstreeBorderPage::get_owner_id(), foedus::storage::masstree::MasstreeBorderPage::get_payload_length(), foedus::storage::masstree::MasstreeBorderPage::get_record(), foedus::storage::masstree::MasstreeBorderPage::get_record_payload(), foedus::storage::masstree::MasstreeBorderPage::get_remainder_length(), foedus::storage::masstree::MasstreeBorderPage::get_slice(), foedus::storage::masstree::MasstreeBorderPage::get_slot(), foedus::storage::masstree::MasstreeBorderPage::get_suffix_length(), foedus::storage::masstree::MasstreeBorderPage::Slot::lengthes_, and foedus::storage::masstree::MasstreeBorderPage::SlotLengthPart::physical_record_length_.
std::ostream& foedus::storage::masstree::operator<< | ( | std::ostream & | o, |
const MasstreeOverwriteLogType & | v | ||
) |
Definition at line 83 of file masstree_log_types.cpp.
References foedus::storage::masstree::MasstreeCommonLogType::get_key(), foedus::storage::masstree::MasstreeCommonLogType::get_payload(), foedus::storage::masstree::MasstreeCommonLogType::key_length_, foedus::storage::masstree::MasstreeCommonLogType::payload_count_, and foedus::storage::masstree::MasstreeCommonLogType::payload_offset_.
std::ostream& foedus::storage::masstree::operator<< | ( | std::ostream & | o, |
const OwnerSamples & | v | ||
) |
Definition at line 231 of file masstree_partitioner_impl.cpp.
References foedus::storage::masstree::OwnerSamples::at(), foedus::storage::masstree::OwnerSamples::get_assignment(), foedus::storage::masstree::OwnerSamples::nodes_, and foedus::storage::masstree::OwnerSamples::subtrees_.
std::ostream& foedus::storage::masstree::operator<< | ( | std::ostream & | o, |
const MasstreePartitioner & | v | ||
) |
std::ostream& foedus::storage::masstree::operator<< | ( | std::ostream & | o, |
const MasstreeComposeContext::PathLevel & | v | ||
) |
Definition at line 2851 of file masstree_composer_impl.cpp.
References foedus::storage::masstree::MasstreeComposeContext::PathLevel::head_, foedus::storage::masstree::MasstreeComposeContext::PathLevel::high_fence_, foedus::storage::masstree::MasstreeComposeContext::PathLevel::layer_, foedus::storage::masstree::MasstreeComposeContext::PathLevel::low_fence_, foedus::storage::masstree::MasstreeComposeContext::PathLevel::next_original_, foedus::storage::masstree::MasstreeComposeContext::PathLevel::next_original_mini_, foedus::storage::masstree::MasstreeComposeContext::PathLevel::next_original_slice_, foedus::storage::masstree::MasstreeComposeContext::PathLevel::page_count_, and foedus::storage::masstree::MasstreeComposeContext::PathLevel::tail_.
void foedus::storage::masstree::prepare_sort_entries | ( | const Partitioner::SortBatchArguments & | args, |
SortEntry * | entries | ||
) |
subroutine of sort_batch_8bytes
Definition at line 444 of file masstree_partitioner_impl.cpp.
References ASSERT_ND, foedus::storage::Partitioner::SortBatchArguments::base_epoch_, foedus::xct::XctId::get_epoch(), foedus::storage::masstree::MasstreeCommonLogType::get_key(), foedus::xct::XctId::get_ordinal(), foedus::log::BaseLogType::header_, foedus::storage::masstree::MasstreeCommonLogType::key_length_, foedus::log::kLogCodeMasstreeDelete, foedus::log::kLogCodeMasstreeInsert, foedus::log::kLogCodeMasstreeOverwrite, foedus::log::kLogCodeMasstreeUpdate, foedus::storage::Partitioner::SortBatchArguments::log_buffer_, foedus::storage::Partitioner::SortBatchArguments::log_positions_, foedus::log::LogHeader::log_type_code_, foedus::storage::Partitioner::SortBatchArguments::logs_count_, normalize_be_bytes_full_aligned(), foedus::snapshot::LogBuffer::resolve(), foedus::storage::masstree::SortEntry::set(), foedus::Epoch::subtract(), and foedus::log::LogHeader::xct_id_.
void foedus::storage::masstree::release_parallel | ( | Engine * | engine, |
VolatilePagePointer | pointer | ||
) |
Definition at line 178 of file masstree_page_impl.cpp.
References foedus::memory::EngineMemory::get_global_volatile_page_resolver(), foedus::Engine::get_memory_manager(), foedus::memory::PageReleaseBatch::release_all(), foedus::storage::masstree::MasstreePage::release_pages_recursive_common(), and foedus::memory::GlobalVolatilePageResolver::resolve_offset().
Referenced by foedus::storage::masstree::MasstreeIntermediatePage::release_pages_recursive_parallel().
|
inline |
Definition at line 221 of file masstree_partitioner_impl.hpp.
References ASSERT_ND, foedus::log::LogHeader::get_type(), foedus::log::BaseLogType::header_, foedus::log::kLogCodeMasstreeDelete, foedus::log::kLogCodeMasstreeInsert, foedus::log::kLogCodeMasstreeOverwrite, foedus::log::kLogCodeMasstreeUpdate, and foedus::snapshot::LogBuffer::resolve().
Referenced by foedus::storage::masstree::MasstreePartitioner::partition_batch().
void foedus::storage::masstree::retrieve_positions | ( | uint32_t | logs_count, |
const SortEntry * | entries, | ||
snapshot::BufferPosition * | out | ||
) |
subroutine of sort_batch_8bytes
Definition at line 432 of file masstree_partitioner_impl.cpp.
References foedus::storage::masstree::SortEntry::position_.
ErrorStack foedus::storage::masstree::verify_page_basic | ( | thread::Thread * | context, |
MasstreePage * | page, | ||
PageType | page_type, | ||
KeySlice | low_fence, | ||
HighFence | high_fence | ||
) |
Definition at line 69 of file masstree_storage_verify.cpp.
References CHECK_AND_ASSERT, foedus::storage::masstree::MasstreePage::get_btree_level(), foedus::storage::masstree::MasstreePage::get_foster_major(), foedus::storage::masstree::MasstreePage::get_foster_minor(), foedus::storage::masstree::MasstreePage::get_high_fence(), foedus::storage::masstree::MasstreePage::get_low_fence(), foedus::storage::PageHeader::get_page_type(), foedus::storage::Page::get_page_type(), foedus::storage::masstree::MasstreePage::has_foster_child(), foedus::storage::masstree::MasstreePage::header(), foedus::storage::masstree::MasstreePage::is_border(), foedus::storage::masstree::MasstreePage::is_foster_major_null(), foedus::storage::masstree::MasstreePage::is_foster_minor_null(), foedus::storage::masstree::MasstreePage::is_high_fence_supremum(), foedus::storage::masstree::MasstreePage::is_locked(), foedus::storage::masstree::MasstreePage::is_moved(), foedus::kRetOk, foedus::thread::Thread::resolve(), foedus::storage::masstree::HighFence::slice_, foedus::storage::PageHeader::snapshot_, and foedus::storage::masstree::HighFence::supremum_.
Referenced by foedus::storage::masstree::MasstreeStoragePimpl::verify_single_thread_border(), and foedus::storage::masstree::MasstreeStoragePimpl::verify_single_thread_intermediate().
const DataOffset foedus::storage::masstree::kBorderPageDataPartOffset |
Offset of data_ member in MasstreeBorderPage.
Definition at line 178 of file masstree_id.hpp.
Referenced by foedus::storage::masstree::MasstreeCommonLogType::apply_record_prepare().
const KeySlice foedus::storage::masstree::kInfimumSlice = 0 |
Definition at line 132 of file masstree_id.hpp.
Referenced by foedus::storage::masstree::SplitBorder::decide_strategy(), foedus::storage::masstree::MasstreePartitioner::design_partition(), foedus::storage::masstree::MasstreeStoragePimpl::fatify_first_root_double(), foedus::storage::masstree::MasstreeStoragePimpl::find_border_physical(), foedus::storage::masstree::MasstreeStoragePimpl::get_first_root(), grow_case_b_common(), foedus::storage::masstree::MasstreeBorderPage::initialize_as_layer_root_physical(), foedus::storage::masstree::MasstreePage::is_low_fence_infimum(), foedus::storage::masstree::MasstreeStoragePimpl::load_empty(), foedus::storage::masstree::MasstreeStoragePimpl::peek_volatile_page_boundaries_next_layer(), foedus::storage::masstree::MasstreeStoragePimpl::peek_volatile_page_boundaries_this_layer(), foedus::storage::masstree::MasstreeStoragePimpl::peek_volatile_page_boundaries_this_layer_recurse(), foedus::storage::masstree::MasstreeStoragePimpl::prefetch_pages_normalized_recurse(), foedus::storage::masstree::ReserveRecords::run(), foedus::storage::masstree::MasstreeBorderPage::track_moved_record_next_layer(), and foedus::storage::masstree::MasstreeStoragePimpl::verify_single_thread_layer().
constexpr uint32_t foedus::storage::masstree::kIntermediateAlmostFull = kMaxIntermediatePointers * 9U / 10U |
Definition at line 52 of file masstree_storage_fatify.cpp.
Referenced by foedus::storage::masstree::MasstreeStoragePimpl::fatify_first_root().
const uint64_t foedus::storage::masstree::kSliceLen = sizeof(KeySlice) |
Shorthand for sizeof(KeySlice).
Not much shorter? you are right..
Definition at line 129 of file masstree_id.hpp.
Referenced by foedus::storage::masstree::MasstreeCommonLogType::compare_logs(), foedus::storage::masstree::MasstreeComposeContext::PathLevel::contains_key(), foedus::storage::masstree::MasstreeBorderPage::ltgt_key(), foedus::storage::masstree::MasstreeComposeContext::PathLevel::needs_to_consume_original(), foedus::storage::masstree::MasstreeBorderPage::will_conflict(), and foedus::storage::masstree::MasstreeBorderPage::will_contain_next_layer().
const KeySlice foedus::storage::masstree::kSupremumSlice = 0xFFFFFFFFFFFFFFFFULL |
Definition at line 137 of file masstree_id.hpp.
Referenced by foedus::storage::masstree::MasstreeComposeContext::PathLevel::contains_slice(), foedus::storage::masstree::MasstreeComposer::drop_volatiles(), foedus::storage::masstree::MasstreeStoragePimpl::fatify_first_root_double(), foedus::storage::masstree::MasstreeStoragePimpl::get_first_root(), grow_case_b_common(), foedus::storage::masstree::MasstreeBorderPage::initialize_as_layer_root_physical(), foedus::storage::masstree::MasstreePage::is_high_fence_supremum(), foedus::storage::masstree::MasstreeStoragePimpl::load_empty(), foedus::storage::masstree::SplitBorder::migrate_records(), foedus::storage::masstree::MasstreeStoragePimpl::prefetch_pages_normalized_recurse(), foedus::storage::masstree::ReserveRecords::run(), foedus::storage::masstree::MasstreeComposeContext::PathLevel::set_no_more_next_original(), foedus::storage::masstree::MasstreeStoragePimpl::verify_single_thread_border(), foedus::storage::masstree::MasstreeStoragePimpl::verify_single_thread_intermediate(), and foedus::storage::masstree::MasstreeStoragePimpl::verify_single_thread_layer().