libfoedus-core
FOEDUS Core Library
foedus::xct::RwLockableXctId Struct Reference

The MCS reader-writer lock variant of LockableXctId. More...

Detailed Description

The MCS reader-writer lock variant of LockableXctId.

Definition at line 1132 of file xct_id.hpp.

#include <xct_id.hpp>

Collaboration diagram for foedus::xct::RwLockableXctId:

Public Member Functions

McsRwLockget_key_lock () __attribute__((always_inline))
 
bool is_keylocked () const __attribute__((always_inline))
 
bool is_deleted () const __attribute__((always_inline))
 
bool is_moved () const __attribute__((always_inline))
 
bool is_next_layer () const __attribute__((always_inline))
 
bool needs_track_moved () const __attribute__((always_inline))
 
bool is_being_written () const __attribute__((always_inline))
 
bool is_hot (thread::Thread *context) const
 
void hotter (thread::Thread *context) const
 
void reset () __attribute__((always_inline))
 used only while page initialization More...
 

Public Attributes

McsRwLock lock_
 the first 64bit: Locking part of TID More...
 
XctId xct_id_
 the second 64bit: Persistent status part of TID. More...
 

Friends

std::ostream & operator<< (std::ostream &o, const RwLockableXctId &v)
 

Member Function Documentation

McsRwLock* foedus::xct::RwLockableXctId::get_key_lock ( )
inline
void foedus::xct::RwLockableXctId::hotter ( thread::Thread context) const

Definition at line 74 of file xct_id.cpp.

References foedus::storage::Page::get_header(), foedus::thread::Thread::get_lock_rnd(), foedus::storage::PageHeader::hotness_, foedus::assorted::ProbCounter::increment(), and foedus::storage::to_page().

Referenced by foedus::xct::XctManagerPimpl::abort_xct().

74  {
75  foedus::storage::to_page(this)->get_header().hotness_.increment(&context->get_lock_rnd());
76 }
Page * to_page(const void *address)
super-dirty way to obtain Page the address belongs to.
Definition: page.hpp:395
void increment(UniformRandom *rnd)
PageHeader & get_header()
At least the basic header exists in all pages.
Definition: page.hpp:336
assorted::ProbCounter hotness_
Loosely maintained statistics on data temperature.
Definition: page.hpp:268

Here is the call graph for this function:

Here is the caller graph for this function:

bool foedus::xct::RwLockableXctId::is_being_written ( ) const
inline

Definition at line 1145 of file xct_id.hpp.

References foedus::xct::XctId::is_being_written().

Referenced by foedus::storage::array::ArrayStoragePimpl::verify_single_thread().

1145 { return xct_id_.is_being_written(); }
XctId xct_id_
the second 64bit: Persistent status part of TID.
Definition: xct_id.hpp:1137
bool is_being_written() const __attribute__((always_inline))
Definition: xct_id.hpp:1038

Here is the call graph for this function:

Here is the caller graph for this function:

bool foedus::xct::RwLockableXctId::is_deleted ( ) const
inline

Definition at line 1141 of file xct_id.hpp.

References foedus::xct::XctId::is_deleted().

Referenced by foedus::storage::array::ArrayStoragePimpl::verify_single_thread().

1141 { return xct_id_.is_deleted(); }
XctId xct_id_
the second 64bit: Persistent status part of TID.
Definition: xct_id.hpp:1137
bool is_deleted() const __attribute__((always_inline))
Definition: xct_id.hpp:1040

Here is the call graph for this function:

Here is the caller graph for this function:

bool foedus::xct::RwLockableXctId::is_hot ( thread::Thread context) const

Definition at line 70 of file xct_id.cpp.

References foedus::storage::PageHeader::contains_hot_records(), foedus::storage::Page::get_header(), and foedus::storage::to_page().

70  {
72 }
Page * to_page(const void *address)
super-dirty way to obtain Page the address belongs to.
Definition: page.hpp:395
bool contains_hot_records(thread::Thread *context)
Definition: page.cpp:81
PageHeader & get_header()
At least the basic header exists in all pages.
Definition: page.hpp:336

Here is the call graph for this function:

bool foedus::xct::RwLockableXctId::is_moved ( ) const
inline

Definition at line 1142 of file xct_id.hpp.

References foedus::xct::XctId::is_moved().

Referenced by foedus::xct::XctManagerPimpl::precommit_xct_lock(), foedus::storage::hash::HashStoragePimpl::track_moved_record(), foedus::storage::masstree::MasstreeBorderPage::track_moved_record(), foedus::storage::masstree::MasstreeBorderPage::try_expand_record_in_page_physical(), and foedus::storage::array::ArrayStoragePimpl::verify_single_thread().

1142 { return xct_id_.is_moved(); }
XctId xct_id_
the second 64bit: Persistent status part of TID.
Definition: xct_id.hpp:1137
bool is_moved() const __attribute__((always_inline))
Definition: xct_id.hpp:1041

Here is the call graph for this function:

Here is the caller graph for this function:

bool foedus::xct::RwLockableXctId::is_next_layer ( ) const
inline

Definition at line 1143 of file xct_id.hpp.

References foedus::xct::XctId::is_next_layer().

Referenced by foedus::xct::XctManagerPimpl::precommit_xct_lock(), foedus::storage::masstree::MasstreeBorderPage::replace_next_layer_snapshot(), foedus::storage::masstree::MasstreeStoragePimpl::track_moved_record(), and foedus::storage::masstree::MasstreeBorderPage::track_moved_record().

1143 { return xct_id_.is_next_layer(); }
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

Here is the call graph for this function:

Here is the caller graph for this function:

bool foedus::xct::RwLockableXctId::needs_track_moved ( ) const
inline

Definition at line 1144 of file xct_id.hpp.

References foedus::xct::XctId::needs_track_moved().

Referenced by foedus::xct::XctManagerPimpl::precommit_xct_lock(), foedus::xct::XctManagerPimpl::precommit_xct_lock_track_write(), foedus::xct::XctManagerPimpl::precommit_xct_verify_readonly(), foedus::xct::XctManagerPimpl::precommit_xct_verify_readwrite(), and foedus::xct::XctManagerPimpl::precommit_xct_verify_track_read().

1144 { return xct_id_.needs_track_moved(); }
XctId xct_id_
the second 64bit: Persistent status part of TID.
Definition: xct_id.hpp:1137
bool needs_track_moved() const __attribute__((always_inline))
is_moved() || is_next_layer()
Definition: xct_id.hpp:1044

Here is the call graph for this function:

Here is the caller graph for this function:

void foedus::xct::RwLockableXctId::reset ( )
inline

used only while page initialization

Definition at line 1150 of file xct_id.hpp.

References foedus::xct::XctId::data_, and foedus::xct::McsRwLock::reset().

Referenced by foedus::xct::McsMockDataPage::init(), and foedus::storage::hash::HashDataPage::reserve_record().

1150  {
1151  lock_.reset();
1152  xct_id_.data_ = 0;
1153  }
XctId xct_id_
the second 64bit: Persistent status part of TID.
Definition: xct_id.hpp:1137
McsRwLock lock_
the first 64bit: Locking part of TID
Definition: xct_id.hpp:1134

Here is the call graph for this function:

Here is the caller graph for this function:

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  o,
const RwLockableXctId v 
)
friend

Definition at line 202 of file xct_id.cpp.

202  {
203  o << "<RwLockableXctId>" << v.xct_id_ << v.lock_ << "</RwLockableXctId>";
204  return o;
205 }

Member Data Documentation

XctId foedus::xct::RwLockableXctId::xct_id_

the second 64bit: Persistent status part of TID.

Definition at line 1137 of file xct_id.hpp.

Referenced by foedus::xct::XctManagerPimpl::abort_xct(), foedus::storage::masstree::MasstreeBorderPage::append_next_layer_snapshot(), foedus::storage::sequential::SequentialPage::append_record_nosync(), foedus::storage::masstree::MasstreeCommonLogType::apply_record_prepare(), foedus::xct::RetrospectiveLockList::construct(), foedus::storage::hash::HashDataPage::create_record_in_snapshot(), foedus::storage::masstree::MasstreeBorderPage::Slot::does_point_to_layer(), foedus::storage::masstree::MasstreeBorderPage::does_point_to_layer(), foedus::storage::array::ArrayComposer::drop_root_volatile(), foedus::storage::masstree::MasstreeStoragePimpl::follow_layer(), foedus::storage::array::ArrayStoragePimpl::follow_pointers_for_read_batch(), foedus::storage::array::ArrayStoragePimpl::follow_pointers_for_write_batch(), foedus::storage::sequential::SequentialRecordBatch::get_epoch_from_offset(), foedus::storage::sequential::SequentialPage::get_first_record_epoch(), foedus::storage::masstree::MasstreeBorderPage::initialize_layer_root(), foedus::storage::array::ArrayStoragePimpl::locate_record_for_read(), foedus::storage::array::ArrayStoragePimpl::locate_record_for_write(), foedus::storage::array::ArrayStoragePimpl::lookup_for_read(), foedus::storage::array::ArrayStoragePimpl::lookup_for_write(), foedus::xct::Xct::on_record_read(), foedus::xct::operator<<(), foedus::storage::hash::RecordLocation::populate_logical(), foedus::storage::hash::RecordLocation::populate_physical(), foedus::xct::XctManagerPimpl::precommit_xct_apply(), foedus::xct::XctManagerPimpl::precommit_xct_lock(), foedus::xct::XctManagerPimpl::precommit_xct_verify_readonly(), foedus::xct::XctManagerPimpl::precommit_xct_verify_readwrite(), foedus::storage::masstree::MasstreeBorderPage::replace_next_layer_snapshot(), foedus::storage::masstree::MasstreeBorderPage::reserve_initially_next_layer(), foedus::storage::hash::HashDataPage::reserve_record(), foedus::storage::masstree::MasstreeBorderPage::reserve_record_space(), foedus::storage::masstree::SplitBorder::run(), foedus::storage::hash::HashDataPage::search_key_physical(), foedus::storage::masstree::MasstreeBorderPage::track_moved_record_next_layer(), foedus::storage::masstree::MasstreeStoragePimpl::verify_single_thread_border(), and foedus::storage::hash::HashStoragePimpl::verify_single_thread_data().


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