libfoedus-core
FOEDUS Core Library
|
Shared data in SnapshotManagerPimpl. More...
Shared data in SnapshotManagerPimpl.
Definition at line 120 of file snapshot_manager_pimpl.hpp.
#include <snapshot_manager_pimpl.hpp>
Public Member Functions | |
SnapshotManagerControlBlock ()=delete | |
~SnapshotManagerControlBlock ()=delete | |
void | initialize () |
void | uninitialize () |
Epoch | get_snapshot_epoch () const |
Epoch | get_snapshot_epoch_weak () const |
SnapshotId | get_previous_snapshot_id () const |
SnapshotId | get_previous_snapshot_id_weak () const |
Epoch | get_requested_snapshot_epoch () const |
void | wakeup_snapshot_children () |
Fires snapshot_children_wakeup_. More... | |
Public Attributes | |
std::atomic< Epoch::EpochInteger > | snapshot_epoch_ |
The most recently snapshot-ed epoch, all logs upto this epoch is safe to delete. More... | |
std::atomic< Epoch::EpochInteger > | requested_snapshot_epoch_ |
When a caller wants to immediately invoke snapshot, it calls trigger_snapshot_immediate(), which sets this value and then wakes up snapshot_thread_. More... | |
std::atomic< SnapshotId > | previous_snapshot_id_ |
ID of previously completed snapshot. More... | |
soc::SharedPolling | snapshot_taken_ |
Fired (notify_all) whenever snapshotting is completed. More... | |
soc::SharedPolling | snapshot_wakeup_ |
Snapshot thread sleeps on this condition variable. More... | |
soc::SharedPolling | snapshot_children_wakeup_ |
Child snapshot managers (the ones in SOC engines) sleep on this condition until the master snapshot manager requests them to launch mappers/reducers for snapshot. More... | |
LogGleanerControlBlock | gleaner_ |
Gleaner-related variables. More... | |
|
delete |
|
delete |
|
inline |
Definition at line 140 of file snapshot_manager_pimpl.hpp.
References previous_snapshot_id_.
Referenced by foedus::snapshot::SnapshotManagerPimpl::get_previous_snapshot_id().
|
inline |
Definition at line 141 of file snapshot_manager_pimpl.hpp.
References previous_snapshot_id_.
Referenced by foedus::snapshot::SnapshotManagerPimpl::get_previous_snapshot_id_weak().
|
inline |
Definition at line 144 of file snapshot_manager_pimpl.hpp.
References requested_snapshot_epoch_.
Referenced by foedus::snapshot::SnapshotManagerPimpl::handle_snapshot(), and foedus::snapshot::SnapshotManagerPimpl::handle_snapshot_triggered().
|
inline |
Definition at line 136 of file snapshot_manager_pimpl.hpp.
References snapshot_epoch_.
Referenced by foedus::snapshot::SnapshotManagerPimpl::get_snapshot_epoch().
|
inline |
Definition at line 137 of file snapshot_manager_pimpl.hpp.
References snapshot_epoch_.
Referenced by foedus::snapshot::SnapshotManagerPimpl::get_snapshot_epoch_weak().
|
inline |
Definition at line 125 of file snapshot_manager_pimpl.hpp.
References gleaner_, foedus::snapshot::LogGleanerControlBlock::initialize(), foedus::soc::SharedPolling::initialize(), foedus::Epoch::kEpochInvalid, requested_snapshot_epoch_, snapshot_children_wakeup_, snapshot_taken_, and snapshot_wakeup_.
Referenced by foedus::snapshot::SnapshotManagerPimpl::initialize_once().
|
inline |
Definition at line 132 of file snapshot_manager_pimpl.hpp.
References gleaner_, and foedus::snapshot::LogGleanerControlBlock::uninitialize().
Referenced by foedus::snapshot::SnapshotManagerPimpl::uninitialize_once().
|
inline |
Fires snapshot_children_wakeup_.
This is n-to-n condition variable, so expect spurrious wakeups.
Definition at line 150 of file snapshot_manager_pimpl.hpp.
References foedus::assorted::memory_fence_release(), foedus::soc::SharedPolling::signal(), and snapshot_children_wakeup_.
Referenced by foedus::snapshot::SnapshotManagerPimpl::stop_snapshot_thread().
LogGleanerControlBlock foedus::snapshot::SnapshotManagerControlBlock::gleaner_ |
Gleaner-related variables.
Definition at line 194 of file snapshot_manager_pimpl.hpp.
Referenced by foedus::snapshot::SnapshotManagerPimpl::handle_snapshot_child(), foedus::snapshot::SnapshotManagerPimpl::handle_snapshot_triggered(), initialize(), foedus::snapshot::SnapshotManagerPimpl::initialize_once(), foedus::snapshot::SnapshotManagerPimpl::is_gleaning(), foedus::snapshot::LogGleanerRef::LogGleanerRef(), foedus::snapshot::SnapshotManagerPimpl::stop_snapshot_thread(), and uninitialize().
std::atomic<SnapshotId> foedus::snapshot::SnapshotManagerControlBlock::previous_snapshot_id_ |
ID of previously completed snapshot.
kNullSnapshotId if no snapshot has been taken. Used to issue a next snapshot ID.
Definition at line 175 of file snapshot_manager_pimpl.hpp.
Referenced by get_previous_snapshot_id(), get_previous_snapshot_id_weak(), foedus::snapshot::SnapshotManagerPimpl::handle_snapshot_triggered(), foedus::snapshot::SnapshotManagerPimpl::initialize_once(), and foedus::snapshot::SnapshotManagerPimpl::issue_next_snapshot_id().
std::atomic< Epoch::EpochInteger > foedus::snapshot::SnapshotManagerControlBlock::requested_snapshot_epoch_ |
When a caller wants to immediately invoke snapshot, it calls trigger_snapshot_immediate(), which sets this value and then wakes up snapshot_thread_.
snapshot_thread_ sees this value then immediately starts snapshotting if the value is larger than the current snapshot_epoch_.
Definition at line 168 of file snapshot_manager_pimpl.hpp.
Referenced by get_requested_snapshot_epoch(), initialize(), foedus::snapshot::SnapshotManagerPimpl::initialize_once(), and foedus::snapshot::SnapshotManagerPimpl::trigger_snapshot_immediate().
soc::SharedPolling foedus::snapshot::SnapshotManagerControlBlock::snapshot_children_wakeup_ |
Child snapshot managers (the ones in SOC engines) sleep on this condition until the master snapshot manager requests them to launch mappers/reducers for snapshot.
The real condition is the various status flag in gleaner_.
Definition at line 191 of file snapshot_manager_pimpl.hpp.
Referenced by foedus::snapshot::SnapshotManagerPimpl::handle_snapshot_child(), initialize(), and wakeup_snapshot_children().
std::atomic< Epoch::EpochInteger > foedus::snapshot::SnapshotManagerControlBlock::snapshot_epoch_ |
The most recently snapshot-ed epoch, all logs upto this epoch is safe to delete.
If not snapshot has been taken, invalid epoch. This is equivalent to snapshots_.back().valid_entil_epoch_ with empty check.
Definition at line 160 of file snapshot_manager_pimpl.hpp.
Referenced by get_snapshot_epoch(), get_snapshot_epoch_weak(), foedus::snapshot::SnapshotManagerPimpl::handle_snapshot_triggered(), and foedus::snapshot::SnapshotManagerPimpl::initialize_once().
soc::SharedPolling foedus::snapshot::SnapshotManagerControlBlock::snapshot_taken_ |
Fired (notify_all) whenever snapshotting is completed.
Definition at line 178 of file snapshot_manager_pimpl.hpp.
Referenced by foedus::snapshot::SnapshotManagerPimpl::handle_snapshot_triggered(), initialize(), and foedus::snapshot::SnapshotManagerPimpl::trigger_snapshot_immediate().
soc::SharedPolling foedus::snapshot::SnapshotManagerControlBlock::snapshot_wakeup_ |
Snapshot thread sleeps on this condition variable.
The real variable is requested_snapshot_epoch_.
Definition at line 184 of file snapshot_manager_pimpl.hpp.
Referenced by initialize(), foedus::snapshot::SnapshotManagerPimpl::sleep_a_while(), and foedus::snapshot::SnapshotManagerPimpl::wakeup().