libfoedus-core
FOEDUS Core Library
|
Pimpl object of RestartManager. More...
Pimpl object of RestartManager.
A private pimpl object for RestartManager. Do not include this header from a client program unless you know what you are doing.
Definition at line 44 of file restart_manager_pimpl.hpp.
#include <restart_manager_pimpl.hpp>
Public Member Functions | |
RestartManagerPimpl ()=delete | |
RestartManagerPimpl (Engine *engine) | |
ErrorStack | initialize_once () override |
ErrorStack | uninitialize_once () override |
ErrorStack | recover () |
Recover the state of database from recent snapshot files and transaction logs. More... | |
ErrorStack | redo_meta_logs (Epoch durable_epoch, Epoch snapshot_epoch) |
Redo metadata operation (create/drop storage) since the latest snapshot. More... | |
![]() | |
DefaultInitializable () | |
virtual | ~DefaultInitializable () |
DefaultInitializable (const DefaultInitializable &)=delete | |
DefaultInitializable & | operator= (const DefaultInitializable &)=delete |
ErrorStack | initialize () override final |
Typical implementation of Initializable::initialize() that provides initialize-once semantics. More... | |
ErrorStack | uninitialize () override final |
Typical implementation of Initializable::uninitialize() that provides uninitialize-once semantics. More... | |
bool | is_initialized () const override final |
Returns whether the object has been already initialized or not. More... | |
![]() | |
virtual | ~Initializable () |
Public Attributes | |
Engine *const | engine_ |
RestartManagerControlBlock * | control_block_ |
|
delete |
|
inlineexplicit |
Definition at line 47 of file restart_manager_pimpl.hpp.
|
overridevirtual |
Implements foedus::DefaultInitializable.
Definition at line 40 of file restart_manager_pimpl.cpp.
References CHECK_ERROR, control_block_, engine_, ERROR_STACK, foedus::soc::SocManager::get_shared_memory_repo(), foedus::Engine::get_soc_manager(), foedus::Engine::get_xct_manager(), foedus::xct::XctManager::is_initialized(), foedus::Engine::is_master(), foedus::kErrorCodeDepedentModuleUnavailableInit, foedus::kRetOk, and recover().
ErrorStack foedus::restart::RestartManagerPimpl::recover | ( | ) |
Recover the state of database from recent snapshot files and transaction logs.
Definition at line 71 of file restart_manager_pimpl.cpp.
References CHECK_ERROR, engine_, foedus::log::LogManager::get_durable_global_epoch(), foedus::Engine::get_log_manager(), foedus::snapshot::SnapshotManager::get_pimpl(), foedus::snapshot::SnapshotManager::get_snapshot_epoch(), foedus::Engine::get_snapshot_manager(), foedus::Engine::get_storage_manager(), foedus::snapshot::SnapshotManagerPimpl::handle_snapshot_triggered(), foedus::Epoch::kEpochInitialDurable, foedus::kRetOk, redo_meta_logs(), foedus::storage::StorageManager::reinitialize_for_recovered_snapshot(), and foedus::Epoch::value().
Referenced by initialize_once().
ErrorStack foedus::restart::RestartManagerPimpl::redo_meta_logs | ( | Epoch | durable_epoch, |
Epoch | snapshot_epoch | ||
) |
Redo metadata operation (create/drop storage) since the latest snapshot.
Essentially this is the only thing the restart manager has to do.
Definition at line 110 of file restart_manager_pimpl.cpp.
References foedus::memory::AlignedMemory::alloc(), ASSERT_ND, foedus::log::LogOptions::construct_meta_log_path(), foedus::storage::StorageManager::drop_storage_apply(), foedus::log::LogOptions::emulation_, engine_, foedus::fs::file_size(), foedus::memory::AlignedMemory::get_block(), foedus::xct::XctId::get_epoch(), foedus::log::LogHeader::get_kind(), foedus::savepoint::SavepointManager::get_meta_logger_offsets(), foedus::Engine::get_options(), foedus::Engine::get_savepoint_manager(), foedus::Engine::get_storage_manager(), foedus::log::LogHeader::get_type(), foedus::log::BaseLogType::header_, foedus::Epoch::is_valid(), foedus::fs::DirectIoFile::kDirectIoSeekSet, foedus::log::kLogCodeArrayCreate, foedus::log::kLogCodeDropLogType, foedus::log::kLogCodeEpochMarker, foedus::log::kLogCodeFiller, foedus::log::kLogCodeHashCreate, foedus::log::kLogCodeInvalid, foedus::log::kLogCodeMasstreeCreate, foedus::log::kLogCodeSequentialCreate, foedus::memory::AlignedMemory::kNumaAllocOnnode, foedus::log::kRecordLogs, foedus::kRetOk, foedus::EngineOptions::log_, foedus::log::LogHeader::log_length_, foedus::log::LogHeader::storage_id_, WRAP_ERROR_CODE, and foedus::log::LogHeader::xct_id_.
Referenced by recover().
|
overridevirtual |
Implements foedus::DefaultInitializable.
Definition at line 57 of file restart_manager_pimpl.cpp.
References foedus::ErrorStackBatch::emprace_back(), engine_, ERROR_STACK, foedus::snapshot::SnapshotManager::get_pimpl(), foedus::Engine::get_snapshot_manager(), foedus::Engine::get_xct_manager(), foedus::xct::XctManager::is_initialized(), foedus::Engine::is_master(), foedus::kErrorCodeDepedentModuleUnavailableUninit, foedus::snapshot::SnapshotManagerPimpl::stop_snapshot_thread(), and SUMMARIZE_ERROR_BATCH.
RestartManagerControlBlock* foedus::restart::RestartManagerPimpl::control_block_ |
Definition at line 63 of file restart_manager_pimpl.hpp.
Referenced by initialize_once().
Engine* const foedus::restart::RestartManagerPimpl::engine_ |
Definition at line 62 of file restart_manager_pimpl.hpp.
Referenced by initialize_once(), recover(), redo_meta_logs(), and uninitialize_once().