libfoedus-core
FOEDUS Core Library
|
Pimpl object of SnapshotManager. More...
Pimpl object of SnapshotManager.
A private pimpl object for SnapshotManager. Do not include this header from a client program unless you know what you are doing.
Definition at line 204 of file snapshot_manager_pimpl.hpp.
#include <snapshot_manager_pimpl.hpp>
Public Member Functions | |
SnapshotManagerPimpl ()=delete | |
SnapshotManagerPimpl (Engine *engine) | |
ErrorStack | initialize_once () override |
ErrorStack | uninitialize_once () override |
const SnapshotOptions & | get_option () const |
shorthand for engine_->get_options().snapshot_. More... | |
Epoch | get_snapshot_epoch () const |
Epoch | get_snapshot_epoch_weak () const |
SnapshotId | get_previous_snapshot_id () const |
SnapshotId | get_previous_snapshot_id_weak () const |
ErrorStack | read_snapshot_metadata (SnapshotId snapshot_id, SnapshotMetadata *out) |
void | trigger_snapshot_immediate (bool wait_completion, Epoch suggested_snapshot_epoch) |
void | stop_snapshot_thread () |
This is a hidden API called at the beginning of engine shutdown (namely restart manager). More... | |
SnapshotId | issue_next_snapshot_id () |
void | wakeup () |
void | sleep_a_while () |
bool | is_stop_requested () const |
bool | is_gleaning () const |
void | handle_snapshot () |
Main routine for snapshot_thread_ in master engine. More... | |
ErrorStack | handle_snapshot_triggered (Snapshot *new_snapshot) |
handle_snapshot() calls this when it should start snapshotting. More... | |
void | handle_snapshot_child () |
Main routine for snapshot_thread_ in child engines. More... | |
ErrorStack | glean_logs (const Snapshot &new_snapshot, std::map< storage::StorageId, storage::SnapshotPagePointer > *new_root_page_pointers) |
Sub-routine of handle_snapshot_triggered(). More... | |
ErrorStack | snapshot_metadata (const Snapshot &new_snapshot, const std::map< storage::StorageId, storage::SnapshotPagePointer > &new_root_page_pointers) |
Sub-routine of handle_snapshot_triggered(). More... | |
ErrorStack | snapshot_savepoint (const Snapshot &new_snapshot) |
Sub-routine of handle_snapshot_triggered(). More... | |
ErrorStack | drop_volatile_pages (const Snapshot &new_snapshot, const std::map< storage::StorageId, storage::SnapshotPagePointer > &new_root_page_pointers) |
Sub-routine of handle_snapshot_triggered(). More... | |
void | drop_volatile_pages_parallel (const Snapshot &new_snapshot, const std::map< storage::StorageId, storage::SnapshotPagePointer > &new_root_page_pointers, void *result_memory, uint16_t parallel_id) |
subroutine invoked by one thread for one node. More... | |
fs::Path | get_snapshot_metadata_file_path (SnapshotId snapshot_id) const |
each snapshot has a snapshot-metadata file "snapshot_metadata_<SNAPSHOT_ID>.xml" in first node's first partition folder. 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_ |
SnapshotManagerControlBlock * | control_block_ |
std::vector< Snapshot > | snapshots_ |
All previously taken snapshots. More... | |
std::atomic< bool > | stop_requested_ |
To locally shutdown snapshot_thread_. More... | |
std::thread | snapshot_thread_ |
The daemon thread of snapshot manager. More... | |
std::chrono::system_clock::time_point | previous_snapshot_time_ |
When snapshot_thread_ took snapshot last time. More... | |
std::vector< LogMapper * > | local_mappers_ |
Mappers in this node. More... | |
LogReducer * | local_reducer_ |
Reducer in this node. More... | |
LogGleanerResource | gleaner_resource_ |
Local resources for gleaner, which runs only in the master node. More... | |
|
delete |
|
inlineexplicit |
Definition at line 207 of file snapshot_manager_pimpl.hpp.
ErrorStack foedus::snapshot::SnapshotManagerPimpl::drop_volatile_pages | ( | const Snapshot & | new_snapshot, |
const std::map< storage::StorageId, storage::SnapshotPagePointer > & | new_root_page_pointers | ||
) |
Sub-routine of handle_snapshot_triggered().
Drop pointers to volatile pages based on the already-installed snapshot pointers.
Definition at line 488 of file snapshot_manager_pimpl.cpp.
References foedus::memory::AlignedMemory::alloc(), ASSERT_ND, foedus::memory::PagePoolOffsetChunk::clear(), foedus::storage::Composer::drop_root_volatile(), drop_volatile_pages_parallel(), foedus::debugging::StopWatch::elapsed_ms(), engine_, foedus::memory::AlignedMemory::get_block(), foedus::Engine::get_soc_count(), foedus::Engine::get_xct_manager(), foedus::Epoch::is_valid(), foedus::memory::AlignedMemory::kNumaAllocOnnode, foedus::kRetOk, foedus::storage::Composer::DropResult::max_observed_, foedus::snapshot::Snapshot::max_storage_id_, foedus::xct::XctManager::pause_accepting_xct(), foedus::memory::AlignedMemory::release_block(), foedus::xct::XctManager::resume_accepting_xct(), foedus::debugging::StopWatch::stop(), and foedus::snapshot::Snapshot::valid_until_epoch_.
Referenced by handle_snapshot_triggered().
void foedus::snapshot::SnapshotManagerPimpl::drop_volatile_pages_parallel | ( | const Snapshot & | new_snapshot, |
const std::map< storage::StorageId, storage::SnapshotPagePointer > & | new_root_page_pointers, | ||
void * | result_memory, | ||
uint16_t | parallel_id | ||
) |
subroutine invoked by one thread for one node.
Definition at line 595 of file snapshot_manager_pimpl.cpp.
References foedus::memory::AlignedMemory::alloc(), ASSERT_ND, foedus::memory::PagePoolOffsetChunk::clear(), foedus::storage::Composer::drop_volatiles(), foedus::storage::Composer::DropResult::dropped_all_, foedus::debugging::StopWatch::elapsed_ms(), foedus::debugging::StopWatch::elapsed_sec(), foedus::memory::PagePoolOffsetChunk::empty(), engine_, foedus::memory::AlignedMemory::get_block(), foedus::Engine::get_memory_manager(), foedus::memory::EngineMemory::get_node_memory(), foedus::Engine::get_soc_count(), foedus::storage::StorageManager::get_storage(), foedus::Engine::get_storage_manager(), foedus::memory::NumaNodeMemoryRef::get_volatile_pool(), foedus::memory::AlignedMemory::kNumaAllocOnnode, foedus::storage::Composer::DropResult::max_observed_, foedus::snapshot::Snapshot::max_storage_id_, foedus::storage::StorageControlBlock::meta_, foedus::storage::Metadata::name_, foedus::Epoch::one_more(), foedus::memory::PagePool::release(), foedus::memory::AlignedMemory::release_block(), foedus::storage::StorageControlBlock::root_page_pointer_, foedus::storage::Metadata::root_snapshot_page_id_, foedus::memory::PagePoolOffsetChunk::size(), foedus::debugging::StopWatch::stop(), and foedus::snapshot::Snapshot::valid_until_epoch_.
Referenced by drop_volatile_pages().
const SnapshotOptions & foedus::snapshot::SnapshotManagerPimpl::get_option | ( | ) | const |
shorthand for engine_->get_options().snapshot_.
Definition at line 57 of file snapshot_manager_pimpl.cpp.
References engine_, foedus::Engine::get_options(), and foedus::EngineOptions::snapshot_.
Referenced by get_snapshot_metadata_file_path(), handle_snapshot(), and snapshot_metadata().
|
inline |
Definition at line 218 of file snapshot_manager_pimpl.hpp.
References control_block_, and foedus::snapshot::SnapshotManagerControlBlock::get_previous_snapshot_id().
Referenced by foedus::snapshot::SnapshotManager::get_previous_snapshot_id().
|
inline |
Definition at line 219 of file snapshot_manager_pimpl.hpp.
References control_block_, and foedus::snapshot::SnapshotManagerControlBlock::get_previous_snapshot_id_weak().
Referenced by foedus::snapshot::SnapshotManager::get_previous_snapshot_id_weak().
|
inline |
Definition at line 215 of file snapshot_manager_pimpl.hpp.
References control_block_, and foedus::snapshot::SnapshotManagerControlBlock::get_snapshot_epoch().
Referenced by foedus::snapshot::SnapshotManager::get_snapshot_epoch(), handle_snapshot(), handle_snapshot_triggered(), and trigger_snapshot_immediate().
|
inline |
Definition at line 216 of file snapshot_manager_pimpl.hpp.
References control_block_, and foedus::snapshot::SnapshotManagerControlBlock::get_snapshot_epoch_weak().
Referenced by foedus::snapshot::SnapshotManager::get_snapshot_epoch_weak().
fs::Path foedus::snapshot::SnapshotManagerPimpl::get_snapshot_metadata_file_path | ( | SnapshotId | snapshot_id | ) | const |
each snapshot has a snapshot-metadata file "snapshot_metadata_<SNAPSHOT_ID>.xml" in first node's first partition folder.
Definition at line 480 of file snapshot_manager_pimpl.cpp.
References get_option().
Referenced by read_snapshot_metadata(), and snapshot_metadata().
ErrorStack foedus::snapshot::SnapshotManagerPimpl::glean_logs | ( | const Snapshot & | new_snapshot, |
std::map< storage::StorageId, storage::SnapshotPagePointer > * | new_root_page_pointers | ||
) |
Sub-routine of handle_snapshot_triggered().
Read log files, distribute them to each partition, and construct snapshot files at each partition. After successful completion, all snapshot files become also durable (LogGleaner's uninitialize() makes it sure). Thus, now we can start installing pointers to the new snapshot file pages.
Definition at line 386 of file snapshot_manager_pimpl.cpp.
References engine_, foedus::snapshot::LogGleaner::execute(), foedus::snapshot::LogGleaner::get_new_root_page_pointers(), gleaner_resource_, and foedus::ErrorStack::is_error().
Referenced by handle_snapshot_triggered().
void foedus::snapshot::SnapshotManagerPimpl::handle_snapshot | ( | ) |
Main routine for snapshot_thread_ in master engine.
This method keeps taking snapshot periodically. When there are no logs in all the private buffers for a while, it goes into sleep. This method exits when this object's uninitialize() is called.
Definition at line 191 of file snapshot_manager_pimpl.cpp.
References control_block_, engine_, foedus::log::LogManager::get_durable_global_epoch(), foedus::Engine::get_log_manager(), get_option(), foedus::snapshot::SnapshotManagerControlBlock::get_requested_snapshot_epoch(), get_snapshot_epoch(), handle_snapshot_triggered(), foedus::ErrorStack::is_error(), foedus::Engine::is_initialized(), is_stop_requested(), foedus::Epoch::is_valid(), foedus::assorted::memory_fence_acquire(), previous_snapshot_time_, sleep_a_while(), and SPINLOCK_WHILE.
Referenced by initialize_once().
void foedus::snapshot::SnapshotManagerPimpl::handle_snapshot_child | ( | ) |
Main routine for snapshot_thread_ in child engines.
All this does is to launch mappers/reducers threads when asked by master engine.
Definition at line 239 of file snapshot_manager_pimpl.cpp.
References foedus::soc::SharedPolling::acquire_ticket(), control_block_, foedus::snapshot::LogGleanerControlBlock::cur_snapshot_, engine_, foedus::Engine::get_soc_id(), foedus::snapshot::SnapshotManagerControlBlock::gleaner_, foedus::snapshot::Snapshot::id_, is_gleaning(), is_stop_requested(), foedus::snapshot::MapReduceBase::join_thread(), foedus::snapshot::MapReduceBase::launch_thread(), local_mappers_, local_reducer_, foedus::snapshot::SnapshotManagerControlBlock::snapshot_children_wakeup_, and foedus::soc::SharedPolling::timedwait().
Referenced by initialize_once().
ErrorStack foedus::snapshot::SnapshotManagerPimpl::handle_snapshot_triggered | ( | Snapshot * | new_snapshot | ) |
handle_snapshot() calls this when it should start snapshotting.
In other words, this function is the main routine of snapshotting.
Definition at line 316 of file snapshot_manager_pimpl.cpp.
References ASSERT_ND, foedus::snapshot::Snapshot::base_epoch_, CHECK_ERROR, control_block_, foedus::snapshot::LogGleanerControlBlock::cur_snapshot_, drop_volatile_pages(), engine_, foedus::log::LogManager::get_durable_global_epoch(), foedus::storage::StorageManager::get_largest_storage_id(), foedus::Engine::get_log_manager(), foedus::snapshot::SnapshotManagerControlBlock::get_requested_snapshot_epoch(), get_snapshot_epoch(), foedus::Engine::get_storage_manager(), glean_logs(), foedus::snapshot::SnapshotManagerControlBlock::gleaner_, foedus::snapshot::Snapshot::id_, foedus::snapshot::increment(), foedus::storage::StorageManager::is_initialized(), foedus::Engine::is_master(), foedus::Epoch::is_valid(), foedus::snapshot::kNullSnapshotId, foedus::kRetOk, foedus::snapshot::Snapshot::max_storage_id_, foedus::assorted::memory_fence_release(), foedus::snapshot::SnapshotManagerControlBlock::previous_snapshot_id_, previous_snapshot_time_, foedus::soc::SharedPolling::signal(), foedus::snapshot::SnapshotManagerControlBlock::snapshot_epoch_, snapshot_metadata(), snapshot_savepoint(), foedus::snapshot::SnapshotManagerControlBlock::snapshot_taken_, foedus::snapshot::Snapshot::valid_until_epoch_, and foedus::Epoch::value().
Referenced by handle_snapshot(), and foedus::restart::RestartManagerPimpl::recover().
|
overridevirtual |
Implements foedus::DefaultInitializable.
Definition at line 61 of file snapshot_manager_pimpl.cpp.
References foedus::snapshot::LogGleanerControlBlock::all_count_, foedus::snapshot::LogGleanerResource::allocate(), ASSERT_ND, CHECK_ERROR, control_block_, foedus::storage::PartitionerMetadata::data_size_, engine_, ERROR_STACK, foedus::soc::SharedMemoryRepo::get_global_memory_anchors(), foedus::savepoint::SavepointManager::get_latest_snapshot_epoch(), foedus::savepoint::SavepointManager::get_latest_snapshot_id(), foedus::Engine::get_log_manager(), foedus::Engine::get_options(), foedus::Engine::get_savepoint_manager(), foedus::soc::SocManager::get_shared_memory_repo(), foedus::Engine::get_soc_count(), foedus::Engine::get_soc_manager(), foedus::snapshot::SnapshotManagerControlBlock::gleaner_, gleaner_resource_, foedus::thread::ThreadOptions::group_count_, handle_snapshot(), handle_snapshot_child(), foedus::snapshot::SnapshotManagerControlBlock::initialize(), foedus::DefaultInitializable::initialize(), foedus::storage::PartitionerMetadata::initialize(), foedus::log::LogManager::is_initialized(), foedus::soc::SharedMutex::is_initialized(), foedus::Engine::is_master(), foedus::Epoch::kEpochInvalid, foedus::kErrorCodeDepedentModuleUnavailableInit, foedus::kRetOk, local_mappers_, local_reducer_, foedus::EngineOptions::log_, foedus::log::LogOptions::loggers_per_node_, foedus::snapshot::LogGleanerControlBlock::mappers_count_, foedus::storage::StorageOptions::max_storages_, foedus::storage::PartitionerMetadata::mutex_, foedus::storage::StorageOptions::partitioner_data_memory_mb_, foedus::soc::GlobalMemoryAnchors::partitioner_metadata_, foedus::snapshot::SnapshotManagerControlBlock::previous_snapshot_id_, previous_snapshot_time_, foedus::snapshot::LogGleanerControlBlock::reducers_count_, foedus::snapshot::SnapshotManagerControlBlock::requested_snapshot_epoch_, foedus::snapshot::SnapshotManagerControlBlock::snapshot_epoch_, foedus::soc::GlobalMemoryAnchors::snapshot_manager_memory_, snapshot_thread_, stop_requested_, foedus::EngineOptions::storage_, foedus::EngineOptions::thread_, and foedus::Epoch::value().
|
inline |
Definition at line 251 of file snapshot_manager_pimpl.hpp.
References control_block_, foedus::snapshot::SnapshotManagerControlBlock::gleaner_, and foedus::snapshot::LogGleanerControlBlock::gleaning_.
Referenced by handle_snapshot_child().
|
inline |
Definition at line 250 of file snapshot_manager_pimpl.hpp.
References stop_requested_.
Referenced by handle_snapshot(), handle_snapshot_child(), sleep_a_while(), and trigger_snapshot_immediate().
|
inline |
Definition at line 239 of file snapshot_manager_pimpl.hpp.
References control_block_, foedus::snapshot::increment(), foedus::snapshot::kNullSnapshotId, and foedus::snapshot::SnapshotManagerControlBlock::previous_snapshot_id_.
ErrorStack foedus::snapshot::SnapshotManagerPimpl::read_snapshot_metadata | ( | SnapshotId | snapshot_id, |
SnapshotMetadata * | out | ||
) |
Definition at line 453 of file snapshot_manager_pimpl.cpp.
References ASSERT_ND, CHECK_ERROR, foedus::debugging::StopWatch::elapsed_ms(), foedus::fs::file_size(), get_snapshot_metadata_file_path(), foedus::snapshot::SnapshotMetadata::id_, foedus::kRetOk, foedus::externalize::Externalizable::load_from_file(), and foedus::debugging::StopWatch::stop().
Referenced by foedus::snapshot::SnapshotManager::read_snapshot_metadata().
void foedus::snapshot::SnapshotManagerPimpl::sleep_a_while | ( | ) |
Definition at line 181 of file snapshot_manager_pimpl.cpp.
References foedus::soc::SharedPolling::acquire_ticket(), control_block_, is_stop_requested(), foedus::snapshot::SnapshotManagerControlBlock::snapshot_wakeup_, and foedus::soc::SharedPolling::timedwait().
Referenced by handle_snapshot().
ErrorStack foedus::snapshot::SnapshotManagerPimpl::snapshot_metadata | ( | const Snapshot & | new_snapshot, |
const std::map< storage::StorageId, storage::SnapshotPagePointer > & | new_root_page_pointers | ||
) |
Sub-routine of handle_snapshot_triggered().
Write out a snapshot metadata file that contains metadata of all storages and a few other global metadata.
Definition at line 401 of file snapshot_manager_pimpl.cpp.
References ASSERT_ND, foedus::snapshot::Snapshot::base_epoch_, foedus::snapshot::SnapshotMetadata::base_epoch_, CHECK_ERROR, foedus::storage::StorageManager::clone_all_storage_metadata(), foedus::fs::create_directories(), foedus::debugging::StopWatch::elapsed_ms(), engine_, ERROR_STACK, foedus::fs::exists(), foedus::fs::file_size(), foedus::fs::fsync(), foedus::snapshot::SnapshotMetadata::get_metadata(), get_option(), get_snapshot_metadata_file_path(), foedus::Engine::get_storage_manager(), foedus::snapshot::Snapshot::id_, foedus::snapshot::SnapshotMetadata::id_, foedus::storage::StorageControlBlock::is_valid_status(), foedus::kErrorCodeFsMkdirFailed, foedus::kRetOk, foedus::snapshot::SnapshotMetadata::largest_storage_id_, foedus::snapshot::Snapshot::max_storage_id_, foedus::externalize::Externalizable::save_to_file(), foedus::debugging::StopWatch::start(), foedus::debugging::StopWatch::stop(), foedus::snapshot::SnapshotMetadata::storage_control_blocks_, foedus::snapshot::Snapshot::valid_until_epoch_, foedus::snapshot::SnapshotMetadata::valid_until_epoch_, and foedus::Epoch::value().
Referenced by handle_snapshot_triggered().
ErrorStack foedus::snapshot::SnapshotManagerPimpl::snapshot_savepoint | ( | const Snapshot & | new_snapshot | ) |
Sub-routine of handle_snapshot_triggered().
Invokes the savepoint module to take savepoint pointing to this snapshot. Until that, the snapshot is not yet deemed as "happened".
Definition at line 469 of file snapshot_manager_pimpl.cpp.
References ASSERT_ND, CHECK_ERROR, engine_, foedus::savepoint::SavepointManager::get_latest_snapshot_epoch(), foedus::savepoint::SavepointManager::get_latest_snapshot_id(), foedus::Engine::get_savepoint_manager(), foedus::snapshot::Snapshot::id_, foedus::kRetOk, foedus::savepoint::SavepointManager::take_savepoint_after_snapshot(), and foedus::snapshot::Snapshot::valid_until_epoch_.
Referenced by handle_snapshot_triggered().
void foedus::snapshot::SnapshotManagerPimpl::stop_snapshot_thread | ( | ) |
This is a hidden API called at the beginning of engine shutdown (namely restart manager).
Snapshot Manager initializes before Storage because it must read previous snapshot, but it must stop snapshot thread before Storage because the snapshot thread relies on storage module. To solve the issue, we call this method from restart manager's uninit to stop snapshot thread. This method is also called by snapshot manager's own uninit() in case restart manager didn't initialize. Thus, this method must be idempotent.
Definition at line 164 of file snapshot_manager_pimpl.cpp.
References foedus::snapshot::LogGleanerControlBlock::cancelled_, control_block_, engine_, foedus::snapshot::SnapshotManagerControlBlock::gleaner_, foedus::Engine::is_master(), snapshot_thread_, stop_requested_, foedus::snapshot::LogGleanerControlBlock::terminating_, wakeup(), and foedus::snapshot::SnapshotManagerControlBlock::wakeup_snapshot_children().
Referenced by foedus::restart::RestartManagerPimpl::uninitialize_once(), and uninitialize_once().
void foedus::snapshot::SnapshotManagerPimpl::trigger_snapshot_immediate | ( | bool | wait_completion, |
Epoch | suggested_snapshot_epoch | ||
) |
Definition at line 277 of file snapshot_manager_pimpl.cpp.
References foedus::soc::SharedPolling::acquire_ticket(), ASSERT_ND, control_block_, engine_, foedus::log::LogManager::get_durable_global_epoch(), foedus::Engine::get_log_manager(), get_snapshot_epoch(), is_stop_requested(), foedus::Epoch::is_valid(), foedus::snapshot::SnapshotManagerControlBlock::requested_snapshot_epoch_, foedus::snapshot::SnapshotManagerControlBlock::snapshot_taken_, foedus::soc::SharedPolling::timedwait(), and wakeup().
Referenced by foedus::snapshot::SnapshotManager::trigger_snapshot_immediate().
|
overridevirtual |
Implements foedus::DefaultInitializable.
Definition at line 125 of file snapshot_manager_pimpl.cpp.
References ASSERT_ND, control_block_, foedus::snapshot::LogGleanerResource::deallocate(), foedus::ErrorStackBatch::emprace_back(), engine_, ERROR_STACK, foedus::soc::SharedMemoryRepo::get_global_memory_anchors(), foedus::Engine::get_log_manager(), foedus::Engine::get_options(), foedus::soc::SocManager::get_shared_memory_repo(), foedus::Engine::get_soc_manager(), gleaner_resource_, foedus::log::LogManager::is_initialized(), foedus::soc::SharedMutex::is_initialized(), foedus::Engine::is_master(), foedus::kErrorCodeDepedentModuleUnavailableUninit, local_mappers_, local_reducer_, foedus::storage::StorageOptions::max_storages_, foedus::storage::PartitionerMetadata::mutex_, foedus::soc::GlobalMemoryAnchors::partitioner_metadata_, foedus::snapshot::LogGleanerResource::per_node_resources_, stop_snapshot_thread(), foedus::EngineOptions::storage_, SUMMARIZE_ERROR_BATCH, foedus::snapshot::SnapshotManagerControlBlock::uninitialize(), foedus::DefaultInitializable::uninitialize(), and foedus::storage::PartitionerMetadata::uninitialize().
void foedus::snapshot::SnapshotManagerPimpl::wakeup | ( | ) |
Definition at line 187 of file snapshot_manager_pimpl.cpp.
References control_block_, foedus::soc::SharedPolling::signal(), and foedus::snapshot::SnapshotManagerControlBlock::snapshot_wakeup_.
Referenced by stop_snapshot_thread(), and trigger_snapshot_immediate().
SnapshotManagerControlBlock* foedus::snapshot::SnapshotManagerPimpl::control_block_ |
Definition at line 323 of file snapshot_manager_pimpl.hpp.
Referenced by get_previous_snapshot_id(), get_previous_snapshot_id_weak(), get_snapshot_epoch(), get_snapshot_epoch_weak(), handle_snapshot(), handle_snapshot_child(), handle_snapshot_triggered(), initialize_once(), is_gleaning(), issue_next_snapshot_id(), sleep_a_while(), stop_snapshot_thread(), trigger_snapshot_immediate(), uninitialize_once(), and wakeup().
Engine* const foedus::snapshot::SnapshotManagerPimpl::engine_ |
Definition at line 321 of file snapshot_manager_pimpl.hpp.
Referenced by drop_volatile_pages(), drop_volatile_pages_parallel(), get_option(), glean_logs(), handle_snapshot(), handle_snapshot_child(), handle_snapshot_triggered(), initialize_once(), snapshot_metadata(), snapshot_savepoint(), stop_snapshot_thread(), trigger_snapshot_immediate(), and uninitialize_once().
LogGleanerResource foedus::snapshot::SnapshotManagerPimpl::gleaner_resource_ |
Local resources for gleaner, which runs only in the master node.
Empty in child nodes.
Definition at line 356 of file snapshot_manager_pimpl.hpp.
Referenced by glean_logs(), initialize_once(), and uninitialize_once().
std::vector<LogMapper*> foedus::snapshot::SnapshotManagerPimpl::local_mappers_ |
Mappers in this node.
Index is logger ordinal. Empty in master engine.
Definition at line 351 of file snapshot_manager_pimpl.hpp.
Referenced by handle_snapshot_child(), initialize_once(), and uninitialize_once().
LogReducer* foedus::snapshot::SnapshotManagerPimpl::local_reducer_ |
Reducer in this node.
Null in master engine.
Definition at line 353 of file snapshot_manager_pimpl.hpp.
Referenced by handle_snapshot_child(), initialize_once(), and uninitialize_once().
std::chrono::system_clock::time_point foedus::snapshot::SnapshotManagerPimpl::previous_snapshot_time_ |
When snapshot_thread_ took snapshot last time.
Read and written only by snapshot_thread_.
Definition at line 348 of file snapshot_manager_pimpl.hpp.
Referenced by handle_snapshot(), handle_snapshot_triggered(), and initialize_once().
std::thread foedus::snapshot::SnapshotManagerPimpl::snapshot_thread_ |
The daemon thread of snapshot manager.
In master engine, this occasionally wakes up and serves as the main managing thread for snapshotting, which consists of several child threads and multiple phases. In child engine, this receives requests from master engine's snapshot_thread_ and launch mappers/reducers in this node.
Definition at line 342 of file snapshot_manager_pimpl.hpp.
Referenced by initialize_once(), and stop_snapshot_thread().
std::vector< Snapshot > foedus::snapshot::SnapshotManagerPimpl::snapshots_ |
All previously taken snapshots.
Access to this data must be protected with mutex. This is populated only in master engine.
Definition at line 330 of file snapshot_manager_pimpl.hpp.
std::atomic<bool> foedus::snapshot::SnapshotManagerPimpl::stop_requested_ |
To locally shutdown snapshot_thread_.
This is not a shared memory.
Definition at line 333 of file snapshot_manager_pimpl.hpp.
Referenced by initialize_once(), is_stop_requested(), and stop_snapshot_thread().