18 #ifndef FOEDUS_STORAGE_COMPOSER_HPP_
19 #define FOEDUS_STORAGE_COMPOSER_HPP_
237 #endif // FOEDUS_STORAGE_COMPOSER_HPP_
const Page *const * root_info_pages_
Root info pages output by compose()
memory::PagePoolOffsetChunk * dropped_chunks_
Caches dropped pages to avoid returning every single page.
Epoch max_observed_
the largest Epoch it observed recursively.
snapshot::LogGleanerResource * gleaner_resource_
All pre-allocated resouces to help run construct_root(), such as memory buffers.
Epoch base_epoch_
All log entries in this inputs are assured to be after this epoch.
Definitions of IDs in this package and a few related constant values.
ErrorStack construct_root(const ConstructRootArguments &args)
Construct root page(s) for one storage based on the ouputs of compose().
Typedefs of ID types used in snapshot package.
DropResult drop_volatiles(const DropVolatilesArguments &args)
Drops volatile pages that have not been modified since the snapshotted epoch.
Represents a logic to compose a new version of data pages for one storage.
uint32_t StorageId
Unique ID for storage.
friend std::ostream & operator<<(std::ostream &o, const DropResult &v)
Root package of FOEDUS (Fast Optimistic Engine for Data Unification Services).
friend std::ostream & operator<<(std::ostream &o, const Composer &v)
Typedefs of ID types used in thread package.
Epoch valid_until_epoch_
This snapshot contains all the logs until this epoch.
Represents a pointer to a volatile page with modification count for preventing ABA.
Forward declarations of classes in root package.
Local resource for the log gleaner, which runs only in the master node.
Brings error stacktrace information as return value of functions.
StorageId get_storage_id() const
Forward declarations of classes in snapshot manager package.
Represents one input stream of sorted log entries.
Composer(Engine *engine, StorageId storage_id)
cache::SnapshotFileSet * previous_snapshot_files_
To read existing snapshots.
Holds a set of read-only file objects for snapshot files.
void on_rec_observed(Epoch epoch)
uint32_t log_streams_count_
Number of sorted runs.
Forward declarations of classes in cache package.
Forward declarations of classes in storage package.
#define CXX11_FINAL
Used in public headers in place of "final" of C++11.
uint64_t SnapshotPagePointer
Page ID of a snapshot page.
Page * root_info_page_
[OUT] Returns pointers and related information that is required to construct the root page...
Database engine object that holds all resources and provides APIs.
ErrorStack compose(const ComposeArguments &args)
Construct snapshot pages from sorted run files of one storage.
Just a marker to denote that the memory region represents a data page.
Represents one snapshot that converts all logs from base epoch to valid_until epoch into snapshot fil...
Retrun value of drop_volatiles()
SnapshotPagePointer * new_root_page_pointer_
[OUT] Returns pointer to new root snapshot page/
bool dropped_all_
Whether all volatile pages under the page was dropped.
uint16_t my_partition_
if partitioned_drop_ is true, the partition this thread should drop volatile pages from ...
cache::SnapshotFileSet * previous_snapshot_files_
To read existing snapshots.
StorageType
Type of the storage, such as hash.
DropResult(const DropVolatilesArguments &args)
void store_max(const Epoch &other)
Kind of std::max(this, other).
To reduce the overhead of grabbing/releasing pages from pool, we pack this many pointers for each gra...
snapshot::SnapshotWriter * snapshot_writer_
Writes out composed pages.
snapshot::SnapshotWriter * snapshot_writer_
Writes out composed pages.
Represents one memory block aligned to actual OS/hardware pages.
bool partitioned_drop_
if true, one thread for each partition will invoke drop_volatiles()
uint32_t root_info_pages_count_
Number of root info pages.
void drop_root_volatile(const DropVolatilesArguments &args)
This is additionally called when no partitions observed any new modifications.
void combine(const DropResult &other)
StorageType get_storage_type() const
uint64_t * dropped_count_
[OUT] Number of volatile pages that were dropped
snapshot::SortedBuffer *const * log_streams_
Sorted runs.
snapshot::Snapshot snapshot_
The new snapshot.
void drop(Engine *engine, VolatilePagePointer pointer) const
Returns (might cache) the given pointer to volatile pool.
memory::AlignedMemory * work_memory_
Working memory to be used in this method.
Arguments for drop_volatiles()
Writes out one snapshot file for all data pages in one reducer.
Arguments for construct_root()