libfoedus-core
FOEDUS Core Library
foedus::storage::masstree::MasstreeBorderPage::Slot Struct Reference

Fix-sized slot for each record, which is placed at the end of data region. More...

Detailed Description

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>

Collaboration diagram for foedus::storage::masstree::MasstreeBorderPage::Slot:

Public Member Functions

 Slot ()=delete
 only reinterpret_cast More...
 
 Slot (const Slot &)=delete
 
Slotoperator= (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]
 

Constructor & Destructor Documentation

foedus::storage::masstree::MasstreeBorderPage::Slot::Slot ( )
delete

only reinterpret_cast

foedus::storage::masstree::MasstreeBorderPage::Slot::Slot ( const Slot )
delete
foedus::storage::masstree::MasstreeBorderPage::Slot::~Slot ( )
delete

Member Function Documentation

bool foedus::storage::masstree::MasstreeBorderPage::Slot::does_point_to_layer ( ) const
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().

560  {
561  return tid_.xct_id_.is_next_layer();
562  }
XctId xct_id_
the second 64bit: Persistent status part of TID.
Definition: xct_id.hpp:1137
bool is_next_layer() const __attribute__((always_inline))
Definition: xct_id.hpp:1042
xct::RwLockableXctId tid_
TID of the record.

Here is the call graph for this function:

Here is the caller graph for this function:

KeyLength foedus::storage::masstree::MasstreeBorderPage::Slot::get_aligned_suffix_length ( ) const
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().

546  {
548  }
KeyLength calculate_suffix_length_aligned(KeyLength remainder_length) __attribute__((always_inline))
KeyLength remainder_length_
Followings are immutable.

Here is the call graph for this function:

Here is the caller graph for this function:

PayloadLength foedus::storage::masstree::MasstreeBorderPage::Slot::get_max_payload_peek ( ) const
inline
PayloadLength foedus::storage::masstree::MasstreeBorderPage::Slot::get_max_payload_stable ( SlotLengthPart  stable_length) const
inline

This is not affected by concurrent threads.

Definition at line 557 of file masstree_page_impl.hpp.

References get_aligned_suffix_length().

557  {
558  return stable_length.physical_record_length_ - get_aligned_suffix_length();
559  }
KeyLength get_aligned_suffix_length() const __attribute__((always_inline))

Here is the call graph for this function:

KeyLength foedus::storage::masstree::MasstreeBorderPage::Slot::get_suffix_length ( ) const
inline

Definition at line 549 of file masstree_page_impl.hpp.

References foedus::storage::masstree::calculate_suffix_length().

549  {
551  }
KeyLength remainder_length_
Followings are immutable.
KeyLength calculate_suffix_length(KeyLength remainder_length) __attribute__((always_inline))

Here is the call graph for this function:

Slot& foedus::storage::masstree::MasstreeBorderPage::Slot::operator= ( const Slot )
delete
SlotLengthPart foedus::storage::masstree::MasstreeBorderPage::Slot::read_lengthes_oneshot ( ) const
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().

568  {
569  SlotLengthUnion ret;
570  ret.word = lengthes_.word;
571  return ret.components;
572  }
SlotLengthUnion lengthes_
Stores mutable length information of the record.

Here is the caller graph for this function:

void foedus::storage::masstree::MasstreeBorderPage::Slot::write_lengthes_oneshot ( SlotLengthPart  new_value)
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().

577  {
578  SlotLengthUnion tmp;
579  tmp.components = new_value;
580  lengthes_.word = tmp.word;
581  }
SlotLengthUnion lengthes_
Stores mutable length information of the record.

Here is the caller graph for this function:

Member Data Documentation

char foedus::storage::masstree::MasstreeBorderPage::Slot::filler_[2]

Definition at line 538 of file masstree_page_impl.hpp.

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().


The documentation for this struct was generated from the following file: