libfoedus-core
FOEDUS Core Library
|
Base of ReadXctAccess and WriteXctAccess. More...
Base of ReadXctAccess and WriteXctAccess.
No virtual anything. POD.
Definition at line 83 of file xct_access.hpp.
#include <xct_access.hpp>
Public Member Functions | |
void | set_owner_id_and_lock_id (RwLockableXctId *owner_id_address, UniversalLockId owner_lock_id) |
Setter for owner_id_address_/owner_lock_id_. More... | |
void | set_owner_id_resolve_lock_id (const memory::GlobalVolatilePageResolver &resolver, RwLockableXctId *owner_id_address) |
Calculate owner_lock_id using the resolver. More... | |
Static Public Member Functions | |
static bool | compare (const RecordXctAccess &left, const RecordXctAccess &right) __attribute__((always_inline)) |
sort the write set in a unique order. More... | |
Public Attributes | |
storage::StorageId | storage_id_ |
The storage we accessed. More... | |
uint32_t | ordinal_ |
Indicates the ordinal among ReadXctAccess/WriteXctAccess of this transaction. More... | |
RwLockableXctId * | owner_id_address_ |
Pointer to the accessed record. More... | |
UniversalLockId | owner_lock_id_ |
Universal Lock ID of the lock in the record. More... | |
|
inlinestatic |
sort the write set in a unique order.
We use UniversalLockId which contains the records's NodeID and local VA offset. This is different from Silo [Tu '13] because we need global ordering across all processes. VA's might give different per-process results.
Definition at line 240 of file xct_access.hpp.
References ordinal_, and owner_lock_id_.
Referenced by foedus::xct::ReadXctAccess::compare(), and foedus::xct::WriteXctAccess::compare().
|
inline |
Setter for owner_id_address_/owner_lock_id_.
These two should be always set/updated together, so prefer this.
Definition at line 111 of file xct_access.hpp.
Referenced by set_owner_id_resolve_lock_id().
void foedus::xct::RecordXctAccess::set_owner_id_resolve_lock_id | ( | const memory::GlobalVolatilePageResolver & | resolver, |
RwLockableXctId * | owner_id_address | ||
) |
Calculate owner_lock_id using the resolver.
This one can't be inlined, though. This is slightly wasteful if you already have lock_id calculated.
Definition at line 93 of file xct_access.cpp.
References set_owner_id_and_lock_id(), and foedus::xct::xct_id_to_universal_lock_id().
Referenced by foedus::xct::Xct::add_to_write_set(), foedus::xct::XctManagerPimpl::precommit_xct_lock_track_write(), and foedus::xct::XctManagerPimpl::precommit_xct_verify_track_read().
uint32_t foedus::xct::RecordXctAccess::ordinal_ |
Indicates the ordinal among ReadXctAccess/WriteXctAccess of this transaction.
For example, first log record has 0, second 1,.. Next transaction of this thread resets it to 0 at begin_xct. This is an auxiliary field we can potentially re-calculate from lock_id_, but it's tedious (it's not address order when it wraps around in log buffer). So, we maintain it here for sanity checks. Also used for stable sorting (in case lock_id_ is same) of read/write-sets.
Definition at line 96 of file xct_access.hpp.
Referenced by foedus::xct::Xct::add_to_read_set(), foedus::xct::Xct::add_to_write_set(), foedus::xct::CurrentLockList::batch_insert_write_placeholders(), compare(), foedus::xct::operator<<(), and foedus::xct::XctManagerPimpl::precommit_xct_sort_access().
RwLockableXctId* foedus::xct::RecordXctAccess::owner_id_address_ |
Pointer to the accessed record.
We can calculate this from lock_id_, this is here just for convenience.
Definition at line 102 of file xct_access.hpp.
Referenced by foedus::xct::XctManagerPimpl::abort_xct(), foedus::xct::Xct::add_related_write_set(), foedus::xct::Xct::assert_related_read_write(), foedus::xct::CurrentLockList::batch_insert_write_placeholders(), foedus::xct::operator<<(), foedus::xct::XctManagerPimpl::precommit_xct_apply(), foedus::xct::XctManagerPimpl::precommit_xct_lock(), foedus::xct::XctManagerPimpl::precommit_xct_lock_batch_track_moved(), foedus::xct::XctManagerPimpl::precommit_xct_lock_track_write(), foedus::xct::XctManagerPimpl::precommit_xct_sort_access(), foedus::xct::XctManagerPimpl::precommit_xct_verify_readonly(), foedus::xct::XctManagerPimpl::precommit_xct_verify_readwrite(), and foedus::xct::XctManagerPimpl::precommit_xct_verify_track_read().
UniversalLockId foedus::xct::RecordXctAccess::owner_lock_id_ |
Universal Lock ID of the lock in the record.
Definition at line 105 of file xct_access.hpp.
Referenced by foedus::xct::CurrentLockList::batch_insert_write_placeholders(), compare(), foedus::xct::CurrentLockListIteratorForWriteSet::next_writes(), and foedus::xct::operator<<().
storage::StorageId foedus::xct::RecordXctAccess::storage_id_ |
The storage we accessed.
Definition at line 85 of file xct_access.hpp.
Referenced by foedus::xct::Xct::add_related_write_set(), foedus::xct::Xct::add_to_write_set(), foedus::xct::operator<<(), foedus::xct::XctManagerPimpl::precommit_xct_apply(), foedus::xct::XctManagerPimpl::precommit_xct_lock_track_write(), foedus::xct::XctManagerPimpl::precommit_xct_verify_readonly(), foedus::xct::XctManagerPimpl::precommit_xct_verify_readwrite(), foedus::xct::XctManagerPimpl::precommit_xct_verify_track_read(), and foedus::storage::hash::HashStoragePimpl::track_moved_record().