31 bool intended_for_write) {
uint16_t physical_record_length_
Byte count the record of the slot occupies, which is immutable.
xct::RwLockableXctId tid_
TID of the record.
Root package of FOEDUS (Fast Optimistic Engine for Data Unification Services).
uint16_t payload_length_
Byte length of the payload.
ErrorCode on_record_read(bool intended_for_write, RwLockableXctId *tid_address, XctId *observed_xid, ReadXctAccess **read_set_address, bool no_readset_if_moved=false, bool no_readset_if_next_layer=false)
The general logic invoked for every record read.
Represents a user transaction.
Persistent status part of Transaction ID.
XctId xct_id_
the second 64bit: Persistent status part of TID.
ErrorCode populate_logical(xct::Xct *cur_xct, HashDataPage *page, DataPageSlotIndex index, bool intended_for_write)
Populates the result with XID and possibly readset.
bool is_valid() const __attribute__((always_inline))
HashDataPage * page_
The data page (might not be bin-head) containing the record.
uint16_t key_length_
Byte length of key of the record.
const Slot * get_slot_address(DataPageSlotIndex record) const __attribute__((always_inline))
same as &get_slot(), but this is more explicit and easier to understand/maintain
char * record_
Address of the record.
uint16_t key_length_
Key length of the slot, which is immutable.
uint16_t cur_payload_length_
Logical payload length as-of the observed XID.
Fix-sized slot for each record, which is placed at the end of data region.
bool is_next_layer() const __attribute__((always_inline))
uint16_t DataPageSlotIndex
uint16_t physical_record_length_
Byte count this record occupies.
void populate_physical(HashDataPage *page, DataPageSlotIndex index)
Populates fields other than readset_.
char * record_from_offset(uint16_t offset)
#define CHECK_ERROR_CODE(x)
This macro calls x and checks its returned error code.
Represents an individual data page in Hashtable Storage.
xct::XctId observed_
TID as of locate_record() identifying the record.
bool is_being_written() const __attribute__((always_inline))
XctId spin_while_being_written() const __attribute__((always_inline))
Returns a version of this Xid whose being_written flag is off.
void memory_fence_consume()
Equivalent to std::atomic_thread_fence(std::memory_order_consume).
xct::ReadXctAccess * readset_
If this method took a read-set on the returned record, points to the corresponding read-set...
bool is_moved() const __attribute__((always_inline))
#define ASSERT_ND(x)
A warning-free wrapper macro of assert() that has no performance effect in release mode even when 'x'...
ErrorCode
Enum of error codes defined in error_code.xmacro.
DataPageSlotIndex index_
Index of the record in the page.
uint16_t offset_
Byte offset in data_ where this record starts.