18 #ifndef FOEDUS_STORAGE_HASH_HASH_RESERVE_IMPL_HPP_
19 #define FOEDUS_STORAGE_HASH_HASH_RESERVE_IMPL_HPP_
151 : xct::SysxctFunctor(),
156 key_length_(key_length),
157 payload_count_(payload_count),
158 aggressive_payload_count_hint_(aggressive_payload_count_hint),
159 hint_check_from_(hint_check_from),
208 #endif // FOEDUS_STORAGE_HASH_HASH_RESERVE_IMPL_HPP_
HashDataPage *const target_
The data page to install a new physical record.
ErrorCode find_and_lock_spacious_tail(xct::SysxctWorkspace *sysxct_workspace, HashDataPage *from_page, HashDataPage **tail)
Root package of FOEDUS (Fast Optimistic Engine for Data Unification Services).
Represents one thread running on one NUMA core.
DataPageSlotIndex out_slot_
[Out] The slot of the record that is found or created.
const PayloadLength payload_count_
Minimal required length of the payload.
const DataPageSlotIndex kSlotNotFound
Persistent status part of Transaction ID.
ErrorCode find_or_create_or_expand(xct::SysxctWorkspace *sysxct_workspace, HashDataPage *page, DataPageSlotIndex examined_records)
The main loop (well, recursion actually).
uint16_t PayloadLength
Represents a byte-length of a payload in this package.
HashDataPage * out_page_
[Out] The page that contains the found/created record.
const void *const key_
The key of the new record.
const KeyLength key_length_
Byte length of the key.
A functor representing the logic in a system transaction via virtual-function.
ErrorCode create_new_tail_page(HashDataPage *cur_tail, HashDataPage **new_tail)
ErrorCode create_new_record_in_tail_page(HashDataPage *tail)
Installs it as a fresh-new physical record, assuming the given page is the tail and already locked...
virtual ErrorCode run(xct::SysxctWorkspace *sysxct_workspace) override
Execute the system transaction.
A system transaction to reserve a physical record(s) in a hash data page.
uint16_t DataPageSlotIndex
const DataPageSlotIndex hint_check_from_
The in-page location from which this sysxct will look for matching records.
A set of information that are used in many places, extracted from the given key.
ReserveRecords(thread::Thread *context, HashDataPage *target, const void *key, KeyLength key_length, const HashCombo &combo, PayloadLength payload_count, PayloadLength aggressive_payload_count_hint, DataPageSlotIndex hint_check_from)
thread::Thread *const context_
Thread context.
ErrorCode expand_record(xct::SysxctWorkspace *sysxct_workspace, HashDataPage *page, DataPageSlotIndex index)
Represents an individual data page in Hashtable Storage.
const PayloadLength aggressive_payload_count_hint_
When we expand the record or allocate a new record, we might allocate a larger-than-necessary space g...
uint16_t KeyLength
Represents a byte-length of a key in this package.
DataPageSlotIndex append_record_to_page(HashDataPage *page, xct::XctId initial_xid) const
Appends a new physical record to the page.
DataPageSlotIndex search_within_page(const HashDataPage *page, DataPageSlotIndex key_count, DataPageSlotIndex examined_records) const
Definitions of IDs in this package and a few related constant values.
Forward declarations of classes in thread package.
ErrorCode
Enum of error codes defined in error_code.xmacro.
Per-thread reused work memory for system transactions.
Forward declarations of classes in hash storage package.
const HashCombo & combo_
Hash info of the key.