libfoedus-core
FOEDUS Core Library
|
Represents a record of read-access during a transaction. More...
Represents a record of read-access during a transaction.
Definition at line 139 of file xct_access.hpp.
#include <xct_access.hpp>
Static Public Member Functions | |
static bool | compare (const ReadXctAccess &left, const ReadXctAccess &right) __attribute__((always_inline)) |
![]() | |
static bool | compare (const RecordXctAccess &left, const RecordXctAccess &right) __attribute__((always_inline)) |
sort the write set in a unique order. More... | |
Public Attributes | |
XctId | observed_owner_id_ |
Transaction ID of the record observed as of the access. More... | |
WriteXctAccess * | related_write_ |
An optional member that points to a write access related to this read. More... | |
![]() | |
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... | |
Friends | |
std::ostream & | operator<< (std::ostream &o, const ReadXctAccess &v) |
Additional Inherited Members | |
![]() | |
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... | |
|
inlinestatic |
Definition at line 156 of file xct_access.hpp.
References foedus::xct::RecordXctAccess::compare().
|
friend |
Definition at line 44 of file xct_access.cpp.
XctId foedus::xct::ReadXctAccess::observed_owner_id_ |
Transaction ID of the record observed as of the access.
Definition at line 143 of file xct_access.hpp.
Referenced by foedus::xct::XctManagerPimpl::abort_xct(), foedus::xct::operator<<(), foedus::xct::XctManagerPimpl::precommit_xct_lock(), foedus::xct::XctManagerPimpl::precommit_xct_verify_readonly(), and foedus::xct::XctManagerPimpl::precommit_xct_verify_readwrite().
WriteXctAccess* foedus::xct::ReadXctAccess::related_write_ |
An optional member that points to a write access related to this read.
For example, an insert in masstree consists of a read-access that verifies the physical record and a write-access to actually install the record logically. If some other thread logically installs the record between the read and write, the xct must abort. This member connects such "related" read-write pairs so that our commit protocol can utilize.
Definition at line 153 of file xct_access.hpp.
Referenced by foedus::xct::Xct::add_related_write_set(), foedus::xct::Xct::assert_related_read_write(), foedus::xct::operator<<(), foedus::xct::XctManagerPimpl::precommit_xct_lock_track_write(), foedus::xct::XctManagerPimpl::precommit_xct_sort_access(), foedus::xct::XctManagerPimpl::precommit_xct_verify_readwrite(), and foedus::xct::XctManagerPimpl::precommit_xct_verify_track_read().