36 uint16_t payload_size,
42 payload_size_ = payload_size;
44 array_range_ = array_range;
47 for (uint16_t i = 0; i < records; ++i) {
49 rec->owner_id_.lock_.reset();
50 rec->owner_id_.xct_id_.set_epoch(initial_epoch);
59 uint16_t payload_size,
65 payload_size_ = payload_size;
67 array_range_ = array_range;
70 for (uint16_t i = 0; i < records; ++i) {
72 rec->owner_id_.lock_.reset();
73 rec->owner_id_.xct_id_.set_epoch(initial_epoch);
92 uint8_t parent_level = parent->
get_level();
97 uint8_t child_level = parent_level - 1U;
98 uint64_t interval = cb->intervals_[child_level];
102 child_range.
end_ = child_range.
begin_ + interval;
uint16_t get_leaf_record_count() const
uint32_t StorageId
Unique ID for storage.
Root package of FOEDUS (Fast Optimistic Engine for Data Unification Services).
Represents a key-value store based on a dense and regular array.
Epoch get_initial_current_epoch() const
void initialize_snapshot_page(Epoch initial_epoch, StorageId storage_id, SnapshotPagePointer page_id, uint16_t payload_size, uint8_t level, const ArrayRange &array_range)
Called only when this page is initialized.
Represents a pointer to a volatile page with modification count for preventing ABA.
uint16_t get_payload_size() const
Returns byte size of one record in this array storage without internal overheads. ...
Represents one data page in Array Storage.
void array_volatile_page_init(const VolatilePageInitArguments &args)
volatile page initialize callback for ArrayPage.
StorageId get_storage_id() const
Engine * get_engine() const
ArrayOffset get_array_size() const
Returns the size of this array.
savepoint::SavepointManager * get_savepoint_manager() const
See Savepoint Manager.
uint16_t index_in_parent_
[IN] Some index (meaning depends on page type) of pointer in parent page to the new page...
ArrayOffset begin_
Inclusive beginning of the offset range.
Page * page_
[IN, OUT] The new page to initialize.
thread::Thread * context_
[IN] Thread on which the procedure is running
const ArrayRange & get_array_range() const
ArrayOffset end_
Exclusive end of the offset range.
const Record * get_leaf_record(uint16_t record, uint16_t payload_size) const __attribute__((always_inline))
bool exists() const
Returns whether this storage is already created.
uint64_t SnapshotPagePointer
Page ID of a snapshot page.
Database engine object that holds all resources and provides APIs.
const Page * parent_
[IN] Parent of the new page.
Shared data of this storage type.
Set of arguments, both inputs and outputs, given to each volatile page initializer.
Represents an offset range in an array storage.
VolatilePagePointer page_id
[IN] New page ID
const uint16_t kInteriorFanout
Max number of entries in an interior page of array storage.
#define ASSERT_ND(x)
A warning-free wrapper macro of assert() that has no performance effect in release mode even when 'x'...
CONTROL_BLOCK * get_control_block() const
const uint16_t kPageSize
A constant defining the page size (in bytes) of both snapshot pages and volatile pages.
uint8_t get_level() const
void initialize_volatile_page(Epoch initial_epoch, StorageId storage_id, VolatilePagePointer page_id, uint16_t payload_size, uint8_t level, const ArrayRange &array_range)