18 #ifndef FOEDUS_STORAGE_ARRAY_ARRAY_COMPOSER_IMPL_HPP_
19 #define FOEDUS_STORAGE_ARRAY_ARRAY_COMPOSER_IMPL_HPP_
80 bool is_to_keep_volatile(uint16_t level);
82 void drop_all_recurse(
116 Page* root_info_page);
129 void apply_batch(uint64_t cur, uint64_t next);
167 uint64_t* installed_count)
const;
168 ErrorCode install_snapshot_pointers_recurse(
173 uint64_t* installed_count)
const;
178 bool verify_cur_path()
const;
183 ArrayOffset begin = offset / offset_intervals_[0] * offset_intervals_[0];
186 bool is_initial_snapshot()
const {
return previous_root_page_pointer_ == 0; }
188 uint16_t get_root_children()
const;
193 const Epoch system_initial_epoch_;
202 const uint16_t payload_size_;
203 const uint8_t levels_;
223 uint32_t allocated_pages_;
230 uint32_t allocated_intermediates_;
232 uint32_t max_intermediates_;
250 #endif // FOEDUS_STORAGE_ARRAY_ARRAY_COMPOSER_IMPL_HPP_
char filler_[ kPageSize -sizeof(PageHeader) -kInteriorFanout *sizeof(SnapshotPagePointer)]
ArrayComposeContext(Engine *engine, snapshot::MergeSort *merge_sort, snapshot::SnapshotWriter *snapshot_writer, cache::SnapshotFileSet *previous_snapshot_files, Page *root_info_page)
ArrayComposeContext methods.
void drop_root_volatile(const Composer::DropVolatilesArguments &args)
Represents a pointer to another page (usually a child page).
Represents a logic to compose a new version of data pages for one storage.
ArrayComposer's compose() implementation separated from the class itself.
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.
uint64_t ArrayOffset
The only key type in array storage.
const uint8_t kMaxLevels
Code in array storage assumes this number as the maximum number of levels.
Represents a pointer to a volatile page with modification count for preventing ABA.
ErrorStack compose(const Composer::ComposeArguments &args)
Forward declarations of classes in root package.
Brings error stacktrace information as return value of functions.
Represents one data page in Array Storage.
Forward declarations of classes in snapshot manager package.
Holds a set of read-only file objects for snapshot files.
Forward declarations of classes in array storage package.
Output of one compose() call, which are then combined in construct_root().
ArrayComposer(Composer *parent)
ArrayComposer methods.
std::string to_string() const
ArrayOffset get_array_size() const
Returns the size of this array.
SnapshotPagePointer pointers_[kInteriorFanout]
Pointers to direct children of root.
ErrorStack construct_root(const Composer::ConstructRootArguments &args)
Definitions of IDs in this package and a few related constant values.
Composer for an array storage.
Receives an arbitrary number of sorted buffers and emits one fully sorted stream of logs...
Composer::DropResult drop_volatiles(const Composer::DropVolatilesArguments &args)
drop_volatiles and related methods
uint64_t SnapshotPagePointer
Page ID of a snapshot page.
Database engine object that holds all resources and provides APIs.
Just a marker to denote that the memory region represents a data page.
Retrun value of drop_volatiles()
uint16_t SnapshotId
Unique ID of Snapshot.
Forward declarations of classes in memory package.
Represents an offset range in an array storage.
Definitions of IDs in this package and a few related constant values.
const uint16_t kInteriorFanout
Max number of entries in an interior page of array storage.
#define ALWAYS_INLINE
A function suffix to hint that the function should always be inlined.
const uint16_t kPageSize
A constant defining the page size (in bytes) of both snapshot pages and volatile pages.
ErrorCode
Enum of error codes defined in error_code.xmacro.
Arguments for drop_volatiles()
Writes out one snapshot file for all data pages in one reducer.
Arguments for construct_root()