18 #ifndef FOEDUS_SAVEPOINT_SAVEPOINT_MANAGER_PIMPL_HPP_
19 #define FOEDUS_SAVEPOINT_SAVEPOINT_MANAGER_PIMPL_HPP_
135 Epoch new_snapshot_epoch);
161 "SavepointManagerControlBlock is too large.");
165 #endif // FOEDUS_SAVEPOINT_SAVEPOINT_MANAGER_PIMPL_HPP_
Epoch get_earliest_epoch() const
SavepointManagerPimpl()=delete
soc::SharedMutex savepoint_mutex_
Read/write to savepoint_ is protected with this mutex.
fs::Path savepoint_path_
Path of the savepoint file.
FixedSavepoint savepoint_
The content of latest savepoint.
soc::SharedPolling save_wakeup_
savepoint thread sleeps on this condition variable.
Epoch::EpochInteger new_snapshot_epoch_
Set with new_snapshot_id_.
snapshot::SnapshotId get_latest_snapshot_id() const
void initialize(bool recursive=false)
Root package of FOEDUS (Fast Optimistic Engine for Data Unification Services).
snapshot::SnapshotId latest_snapshot_id_
uint32_t EpochInteger
Unsigned integer representation of epoch.
Forward declarations of classes in root package.
Brings error stacktrace information as return value of functions.
SavepointManagerPimpl(Engine *engine)
The information we maintain in savepoint manager and externalize to a file.
A polling-wait mechanism that can be placed in shared memory and used from multiple processes...
Typical implementation of Initializable as a skeleton base class.
Epoch get_saved_durable_epoch() const
soc::SharedPolling save_done_event_
Whenever a savepoint has been taken, this event is fired.
A mutex that can be placed in shared memory and used from multiple processes.
3 << 19 is for FixedSavepoint.
Zero is always reserved for invalid epoch.
Epoch::EpochInteger saved_durable_epoch_
The durable epoch that has been made persistent in previous savepoint-ing.
ErrorStack initialize_once() override
Epoch get_initial_durable_epoch() const
SavepointManagerControlBlock * control_block_
Epoch::EpochInteger latest_snapshot_epoch_
ErrorStack uninitialize_once() override
Analogue of boost::filesystem::path.
Database engine object that holds all resources and provides APIs.
Epoch::EpochInteger initial_durable_epoch_
Epoch get_initial_current_epoch() const
Shared data in SavepointManagerPimpl.
ErrorStack take_savepoint(Epoch new_global_durable_epoch)
ErrorStack take_savepoint_after_snapshot(snapshot::SnapshotId new_snapshot_id, Epoch new_snapshot_epoch)
uint16_t SnapshotId
Unique ID of Snapshot.
Pimpl object of SavepointManager.
~SavepointManagerControlBlock()=delete
Epoch get_requested_durable_epoch() const
const SnapshotId kNullSnapshotId
Savepoint that can be stored in shared memory.
Forward declarations of classes in savepoint manager package.
SavepointManagerControlBlock()=delete
Epoch get_latest_snapshot_epoch() const
Savepoint savepoint_
The current progress of the entire engine.
std::atomic< bool > master_initialized_
snapshot::SnapshotId new_snapshot_id_
The ID of the new snapshot to remember.
Epoch::EpochInteger requested_durable_epoch_
Client SOC sets this value and then wakes up the savepoint thread.
void update_shared_savepoint(const Savepoint &src)
Information in savepoint for one logger.
uint16_t LoggerId
Typedef for an ID of Logger.
std::atomic< bool > savepoint_thread_stop_requested_
Epoch::EpochInteger initial_current_epoch_
LoggerSavepointInfo get_logger_savepoint(log::LoggerId logger_id)
std::thread savepoint_thread_
The thread to take savepoints.
Epoch::EpochInteger earliest_epoch_