libfoedus-core
FOEDUS Core Library
|
Fix-sized slot for each record, which is placed at the end of data region. More...
Fix-sized slot for each record, which is placed at the end of data region.
Each slot takes 32-bytes, which are not small but not bad either to reduce cache-line contentios on TIDs. Every slot is also aligned to 32-bytes.
Definition at line 500 of file masstree_page_impl.hpp.
#include <masstree_page_impl.hpp>
Public Member Functions | |
Slot ()=delete | |
only reinterpret_cast More... | |
Slot (const Slot &)=delete | |
Slot & | operator= (const Slot &)=delete |
~Slot ()=delete | |
KeyLength | get_aligned_suffix_length () const __attribute__((always_inline)) |
KeyLength | get_suffix_length () const __attribute__((always_inline)) |
PayloadLength | get_max_payload_peek () const __attribute__((always_inline)) |
This might be affected by concurrent threads. More... | |
PayloadLength | get_max_payload_stable (SlotLengthPart stable_length) const __attribute__((always_inline)) |
This is not affected by concurrent threads. More... | |
bool | does_point_to_layer () const __attribute__((always_inline)) |
SlotLengthPart | read_lengthes_oneshot () const __attribute__((always_inline)) |
Reads lengthes_ of this slot in one-shot. More... | |
void | write_lengthes_oneshot (SlotLengthPart new_value) __attribute__((always_inline)) |
Writes lengthes_ in one-shot. More... | |
Public Attributes | |
xct::RwLockableXctId | tid_ |
TID of the record. More... | |
SlotLengthUnion | lengthes_ |
Stores mutable length information of the record. More... | |
KeyLength | remainder_length_ |
Followings are immutable. More... | |
DataOffset | original_physical_record_length_ |
The value of physical_record_length_ as of the creation of this record. More... | |
DataOffset | original_offset_ |
The value of offset_ as of the creation of this record. More... | |
char | filler_ [2] |
|
delete |
only reinterpret_cast
|
delete |
|
delete |
|
inline |
Definition at line 560 of file masstree_page_impl.hpp.
References foedus::xct::XctId::is_next_layer(), and foedus::xct::RwLockableXctId::xct_id_.
Referenced by foedus::storage::masstree::MasstreeBorderPage::try_expand_record_in_page_physical(), and foedus::storage::masstree::MasstreeBorderPage::verify_slot_lengthes().
|
inline |
Definition at line 546 of file masstree_page_impl.hpp.
References foedus::storage::masstree::calculate_suffix_length_aligned().
Referenced by get_max_payload_peek(), and get_max_payload_stable().
|
inline |
This might be affected by concurrent threads.
Definition at line 553 of file masstree_page_impl.hpp.
References foedus::storage::masstree::MasstreeBorderPage::SlotLengthUnion::components, get_aligned_suffix_length(), and foedus::storage::masstree::MasstreeBorderPage::SlotLengthPart::physical_record_length_.
Referenced by foedus::storage::masstree::MasstreeBorderPage::get_max_payload_length(), and foedus::storage::masstree::MasstreeBorderPage::verify_slot_lengthes().
|
inline |
This is not affected by concurrent threads.
Definition at line 557 of file masstree_page_impl.hpp.
References get_aligned_suffix_length().
|
inline |
Definition at line 549 of file masstree_page_impl.hpp.
References foedus::storage::masstree::calculate_suffix_length().
|
inline |
Reads lengthes_ of this slot in one-shot.
It returns a complete value, not half-written, of lengthes_ at some point of time.
Definition at line 568 of file masstree_page_impl.hpp.
References foedus::storage::masstree::MasstreeBorderPage::SlotLengthUnion::components, and foedus::storage::masstree::MasstreeBorderPage::SlotLengthUnion::word.
Referenced by foedus::storage::masstree::MasstreeBorderPage::try_expand_record_in_page_physical().
|
inline |
Writes lengthes_ in one-shot.
Use this to update an existing slot. You don't need to use it if you are creating a new slot as there is no race.
Definition at line 577 of file masstree_page_impl.hpp.
References foedus::storage::masstree::MasstreeBorderPage::SlotLengthUnion::components, and foedus::storage::masstree::MasstreeBorderPage::SlotLengthUnion::word.
Referenced by foedus::storage::masstree::MasstreeBorderPage::try_expand_record_in_page_physical().
char foedus::storage::masstree::MasstreeBorderPage::Slot::filler_[2] |
Definition at line 538 of file masstree_page_impl.hpp.
SlotLengthUnion foedus::storage::masstree::MasstreeBorderPage::Slot::lengthes_ |
Stores mutable length information of the record.
Because these are mutable, in some cases you must read this 8-byte in one-shot. Use read_lengthes_oneshot() then.
Definition at line 510 of file masstree_page_impl.hpp.
Referenced by foedus::storage::masstree::MasstreeBorderPage::append_next_layer_snapshot(), foedus::storage::masstree::MasstreeBorderPage::get_offset_in_bytes(), foedus::storage::masstree::MasstreeBorderPage::get_payload_length(), foedus::storage::masstree::MasstreeBorderPage::initialize_layer_root(), foedus::storage::masstree::operator<<(), foedus::storage::masstree::MasstreeBorderPage::replace_next_layer_snapshot(), foedus::storage::masstree::MasstreeBorderPage::reserve_initially_next_layer(), foedus::storage::masstree::MasstreeBorderPage::reserve_record_space(), foedus::storage::masstree::MasstreeBorderPage::try_expand_record_in_page_physical(), and foedus::storage::masstree::MasstreeBorderPage::verify_slot_lengthes().
DataOffset foedus::storage::masstree::MasstreeBorderPage::Slot::original_offset_ |
The value of offset_ as of the creation of this record.
Immutable once made.
Definition at line 537 of file masstree_page_impl.hpp.
Referenced by foedus::storage::masstree::MasstreeBorderPage::append_next_layer_snapshot(), foedus::storage::masstree::MasstreeBorderPage::initialize_layer_root(), foedus::storage::masstree::MasstreeBorderPage::reserve_initially_next_layer(), foedus::storage::masstree::MasstreeBorderPage::reserve_record_space(), and foedus::storage::masstree::MasstreeBorderPage::verify_slot_lengthes().
DataOffset foedus::storage::masstree::MasstreeBorderPage::Slot::original_physical_record_length_ |
The value of physical_record_length_ as of the creation of this record.
Immutable once made.
Definition at line 532 of file masstree_page_impl.hpp.
Referenced by foedus::storage::masstree::MasstreeBorderPage::append_next_layer_snapshot(), foedus::storage::masstree::MasstreeBorderPage::initialize_layer_root(), foedus::storage::masstree::MasstreeBorderPage::replace_next_layer_snapshot(), foedus::storage::masstree::MasstreeBorderPage::reserve_initially_next_layer(), foedus::storage::masstree::MasstreeBorderPage::reserve_record_space(), and foedus::storage::masstree::MasstreeBorderPage::verify_slot_lengthes().
KeyLength foedus::storage::masstree::MasstreeBorderPage::Slot::remainder_length_ |
Followings are immutable.
Length of remainder, the key excluding slices in previous layers, but including this layer (which might be less than 8!) and suffix if exists. 8 is kind of optimal, storing everything in slice. 0-7 also stores everything in slice, but note that you have to distinct the same slice with different length. 9- stores a suffix in this page. 0xFFFF (kInitiallyNextLayer) is a special value that is used only for a record that was initially next-layer. Unlike the original Masstree, this is an immutable property and unchanged even when now this record points to next layer. Immutable once made. Remainder vs Remaining Key
Definition at line 527 of file masstree_page_impl.hpp.
Referenced by foedus::storage::masstree::MasstreeBorderPage::append_next_layer_snapshot(), foedus::storage::masstree::MasstreeBorderPage::get_remainder_length(), foedus::storage::masstree::MasstreeBorderPage::initialize_layer_root(), foedus::storage::masstree::MasstreeBorderPage::replace_next_layer_snapshot(), foedus::storage::masstree::MasstreeBorderPage::reserve_initially_next_layer(), foedus::storage::masstree::MasstreeBorderPage::reserve_record_space(), foedus::storage::masstree::MasstreeBorderPage::track_moved_record(), foedus::storage::masstree::MasstreeBorderPage::try_expand_record_in_page_physical(), and foedus::storage::masstree::MasstreeBorderPage::verify_slot_lengthes().
xct::RwLockableXctId foedus::storage::masstree::MasstreeBorderPage::Slot::tid_ |
TID of the record.
Definition at line 504 of file masstree_page_impl.hpp.
Referenced by foedus::storage::masstree::MasstreeBorderPage::append_next_layer_snapshot(), foedus::storage::masstree::MasstreeBorderPage::does_point_to_layer(), foedus::storage::masstree::MasstreeBorderPage::get_owner_id(), foedus::storage::masstree::MasstreeBorderPage::initialize_layer_root(), foedus::storage::masstree::MasstreeBorderPage::replace_next_layer_snapshot(), foedus::storage::masstree::MasstreeBorderPage::reserve_initially_next_layer(), foedus::storage::masstree::MasstreeBorderPage::reserve_record_space(), foedus::storage::masstree::MasstreeBorderPage::track_moved_record(), and foedus::storage::masstree::MasstreeBorderPage::try_expand_record_in_page_physical().