18 #ifndef FOEDUS_STORAGE_HASH_HASH_COMPOSER_IMPL_HPP_
19 #define FOEDUS_STORAGE_HASH_HASH_COMPOSER_IMPL_HPP_
82 *out_error = pointer->construct_root_multi_level(*args, numa_node, root_page);
110 void drop_volatiles_child(
113 uint8_t parent_level,
126 void drop_volatile_entire_bin(
130 bool is_to_keep_volatile(uint16_t level);
132 void drop_all_recurse(
149 Page* root_info_page);
158 ErrorCode apply_batch(uint64_t cur, uint64_t next);
173 bool is_initial_snapshot()
const {
return previous_root_page_pointer_ == 0; }
182 return get_cur_path_page(cur_path_lowest_level_);
206 bool verify_cur_path()
const;
231 return intermediate_base_ + root_index;
241 void update_cur_intermediate_tail(
HashBin bin);
254 ErrorCode expand_intermediate_pool_if_needed();
262 ErrorStack install_snapshot_data_pages(uint64_t* installed_count)
const;
264 ErrorStack install_snapshot_data_pages_root_child(
267 uint64_t* installed_count)
const;
274 const Epoch system_initial_epoch_;
283 const bool partitionable_;
284 const uint8_t levels_;
285 const uint8_t bin_bits_;
286 const uint8_t bin_shifts_;
287 const uint16_t root_children_;
288 const uint16_t numa_node_;
289 const HashBin total_bin_count_;
314 uint8_t cur_path_lowest_level_;
350 uint32_t allocated_pages_;
356 uint32_t allocated_intermediates_;
358 uint32_t max_intermediates_;
373 #endif // FOEDUS_STORAGE_HASH_HASH_COMPOSER_IMPL_HPP_
void drop_root_volatile(const Composer::DropVolatilesArguments &args)
ErrorStack construct_root(const Composer::ConstructRootArguments &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.
uint32_t StorageId
Unique ID for storage.
Root package of FOEDUS (Fast Optimistic Engine for Data Unification Services).
An in-memory single-threaded data structure to compose tuples in a hash bin.
Represents a pointer to a volatile page with modification count for preventing ABA.
Forward declarations of classes in root package.
Composer::DropResult drop_volatiles(const Composer::DropVolatilesArguments &args)
drop_volatiles and related methods
Brings error stacktrace information as return value of functions.
Forward declarations of classes in snapshot manager package.
Holds a set of read-only file objects for snapshot files.
static void launch_construct_root_multi_level(HashComposer *pointer, const Composer::ConstructRootArguments *args, uint16_t numa_node, HashIntermediatePage *root_page, ErrorStack *out_error)
launched on its own thread.
Forward declarations of classes in cache package.
std::string to_string() const
HashComposer(Composer *parent)
HashComposer methods.
Definitions of IDs in this package and a few related constant values.
Receives an arbitrary number of sorted buffers and emits one fully sorted stream of logs...
uint64_t SnapshotPagePointer
Page ID of a snapshot page.
HashComposer's compose() implementation separated from the class itself.
Database engine object that holds all resources and provides APIs.
Just a marker to denote that the memory region represents a data page.
Represents a range of hash bins in a hash storage, such as what an intermediate page is responsible f...
Retrun value of drop_volatiles()
uint16_t SnapshotId
Unique ID of Snapshot.
Represents a key-value store based on a dense and regular hash.
ErrorStack compose(const Composer::ComposeArguments &args)
Forward declarations of classes in memory package.
Represents an intermediate page in Hashtable Storage.
uint64_t HashBin
Represents a bin of a hash value.
Represents an individual data page in Hashtable Storage.
Represents one memory block aligned to actual OS/hardware pages.
Composer for a hash storage.
HashComposeContext(Engine *engine, snapshot::MergeSort *merge_sort, snapshot::SnapshotWriter *snapshot_writer, cache::SnapshotFileSet *previous_snapshot_files, Page *root_info_page)
HashComposeContext methods.
const uint8_t kHashMaxBinBits
Maximum number allowed for bin-bits.
#define ASSERT_ND(x)
A warning-free wrapper macro of assert() that has no performance effect in release mode even when 'x'...
Definitions of IDs in this package and a few related constant values.
#define ALWAYS_INLINE
A function suffix to hint that the function should always be inlined.
ErrorCode
Enum of error codes defined in error_code.xmacro.
uint16_t get_root_children() const
Forward declarations of classes in hash storage package.
Arguments for drop_volatiles()
A page to pack many ComposedBin as an output of composer.
Writes out one snapshot file for all data pages in one reducer.
Arguments for construct_root()