18 #ifndef FOEDUS_STORAGE_MASSTREE_MASSTREE_SPLIT_IMPL_HPP_
19 #define FOEDUS_STORAGE_MASSTREE_MASSTREE_SPLIT_IMPL_HPP_
86 bool disable_no_record_split =
false,
87 bool piggyback_reserve =
false,
90 const void* piggyback_suffix =
nullptr)
91 : xct::SysxctFunctor(),
95 disable_no_record_split_(disable_no_record_split),
96 piggyback_reserve_(piggyback_reserve),
97 piggyback_remainder_length_(piggyback_remainder_length),
98 piggyback_payload_count_(piggyback_payload_count),
99 piggyback_suffix_(piggyback_suffix) {
183 : xct::SysxctFunctor(),
186 piggyback_adopt_child_(piggyback_adopt_child) {
249 #endif // FOEDUS_STORAGE_MASSTREE_MASSTREE_SPLIT_IMPL_HPP_
void migrate_records(KeySlice inclusive_from, KeySlice inclusive_to, MasstreeBorderPage *dest) const
Subroutine to construct a new page.
KeySlice separators_[kMaxSeparators]
pointers_[n] points to page that is responsible for keys separators_[n - 1] <= key < separators_[n]...
void decide_strategy(SplitStrategy *out) const
Subroutine to decide how we will split this page.
bool compact_adopt_
When this says true, we create a dummy foster with empty range on right side, and just re-structures ...
Represents a pointer to another page (usually a child page).
uint16_t PayloadLength
Represents a byte-length of a payload in this package.
Definitions of IDs in this package and a few related constant values.
uint16_t SlotIndex
Index of a record in a (border) page.
Root package of FOEDUS (Fast Optimistic Engine for Data Unification Services).
Represents one thread running on one NUMA core.
Represents one border page in Masstree Storage.
uint64_t KeySlice
Each key slice is an 8-byte integer.
DualPagePointer pointers_[kMaxSeparators]
Definitions of IDs in this package and a few related constant values.
uint16_t KeyLength
Represents a byte-length of a key in this package.
Common base of MasstreeIntermediatePage and MasstreeBorderPage.
SplitBorder(thread::Thread *context, MasstreeBorderPage *target, KeySlice trigger, bool disable_no_record_split=false, bool piggyback_reserve=false, KeyLength piggyback_remainder_length=0, PayloadLength piggyback_payload_count=0, const void *piggyback_suffix=nullptr)
ErrorCode lock_existing_records(xct::SysxctWorkspace *sysxct_workspace)
Subroutine to lock existing records in target_.
A functor representing the logic in a system transaction via virtual-function.
Definitions of IDs in this package and a few related constant values.
A system transaction to split a border page in Master-Tree.
bool no_record_split_
whether this page seems to have had sequential insertions, in which case we do "no-record split" as o...
const KeySlice trigger_
The key that triggered this split.
uint16_t total_separator_count_
KeySlice mid_slice_
This will be the new foster fence.
SlotIndex original_key_count_
const KeyLength piggyback_remainder_length_
MasstreeBorderPage *const target_
The page to split.
const bool piggyback_reserve_
An optimization to also make room for a record.
Represents one intermediate page in Masstree Storage.
const void * piggyback_suffix_
virtual ErrorCode run(xct::SysxctWorkspace *sysxct_workspace) override
Border node's Split.
Forward declarations of classes in masstree storage package.
const bool disable_no_record_split_
If true, we never do no-record-split (NRS).
Forward declarations of classes in thread package.
Obtains multiple free volatile pages at once and releases them automatically when this object gets ou...
thread::Thread *const context_
Thread context.
const PayloadLength piggyback_payload_count_
ErrorCode
Enum of error codes defined in error_code.xmacro.
Per-thread reused work memory for system transactions.