libfoedus-core
FOEDUS Core Library
foedus::savepoint::SavepointManagerControlBlock Struct Reference

Shared data in SavepointManagerPimpl. More...

Detailed Description

Shared data in SavepointManagerPimpl.

Definition at line 38 of file savepoint_manager_pimpl.hpp.

#include <savepoint_manager_pimpl.hpp>

Collaboration diagram for foedus::savepoint::SavepointManagerControlBlock:

Public Member Functions

 SavepointManagerControlBlock ()=delete
 
 ~SavepointManagerControlBlock ()=delete
 
void initialize ()
 
void uninitialize ()
 

Public Attributes

std::atomic< bool > master_initialized_
 
Epoch::EpochInteger initial_current_epoch_
 
Epoch::EpochInteger initial_durable_epoch_
 
Epoch::EpochInteger earliest_epoch_
 
soc::SharedPolling save_wakeup_
 savepoint thread sleeps on this condition variable. More...
 
Epoch::EpochInteger saved_durable_epoch_
 The durable epoch that has been made persistent in previous savepoint-ing. More...
 
Epoch::EpochInteger requested_durable_epoch_
 Client SOC sets this value and then wakes up the savepoint thread. More...
 
soc::SharedPolling save_done_event_
 Whenever a savepoint has been taken, this event is fired. More...
 
soc::SharedMutex savepoint_mutex_
 Read/write to savepoint_ is protected with this mutex. More...
 
snapshot::SnapshotId new_snapshot_id_
 The ID of the new snapshot to remember. More...
 
Epoch::EpochInteger new_snapshot_epoch_
 Set with new_snapshot_id_. More...
 
FixedSavepoint savepoint_
 The content of latest savepoint. More...
 

Constructor & Destructor Documentation

foedus::savepoint::SavepointManagerControlBlock::SavepointManagerControlBlock ( )
delete
foedus::savepoint::SavepointManagerControlBlock::~SavepointManagerControlBlock ( )
delete

Member Function Documentation

void foedus::savepoint::SavepointManagerControlBlock::initialize ( )
inline

Definition at line 43 of file savepoint_manager_pimpl.hpp.

References foedus::soc::SharedMutex::initialize(), foedus::soc::SharedPolling::initialize(), foedus::Epoch::kEpochInvalid, foedus::snapshot::kNullSnapshotId, new_snapshot_epoch_, new_snapshot_id_, save_done_event_, save_wakeup_, and savepoint_mutex_.

Referenced by foedus::savepoint::SavepointManagerPimpl::initialize_once().

43  {
49  }
soc::SharedMutex savepoint_mutex_
Read/write to savepoint_ is protected with this mutex.
soc::SharedPolling save_wakeup_
savepoint thread sleeps on this condition variable.
Epoch::EpochInteger new_snapshot_epoch_
Set with new_snapshot_id_.
void initialize(bool recursive=false)
soc::SharedPolling save_done_event_
Whenever a savepoint has been taken, this event is fired.
Zero is always reserved for invalid epoch.
Definition: epoch.hpp:68
const SnapshotId kNullSnapshotId
Definition: snapshot_id.hpp:45
snapshot::SnapshotId new_snapshot_id_
The ID of the new snapshot to remember.

Here is the call graph for this function:

Here is the caller graph for this function:

void foedus::savepoint::SavepointManagerControlBlock::uninitialize ( )
inline

Definition at line 50 of file savepoint_manager_pimpl.hpp.

References savepoint_mutex_, and foedus::soc::SharedMutex::uninitialize().

Referenced by foedus::savepoint::SavepointManagerPimpl::uninitialize_once().

50  {
52  }
soc::SharedMutex savepoint_mutex_
Read/write to savepoint_ is protected with this mutex.

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

Epoch::EpochInteger foedus::savepoint::SavepointManagerControlBlock::earliest_epoch_
Epoch::EpochInteger foedus::savepoint::SavepointManagerControlBlock::initial_current_epoch_
Epoch::EpochInteger foedus::savepoint::SavepointManagerControlBlock::initial_durable_epoch_
std::atomic<bool> foedus::savepoint::SavepointManagerControlBlock::master_initialized_
Epoch::EpochInteger foedus::savepoint::SavepointManagerControlBlock::new_snapshot_epoch_
snapshot::SnapshotId foedus::savepoint::SavepointManagerControlBlock::new_snapshot_id_

The ID of the new snapshot to remember.

Set from take_savepoint_after_snapshot to request taking a new snapshot just for updating snapshot ID in savepoint file. kNullSnapshotId if not requested.

Definition at line 92 of file savepoint_manager_pimpl.hpp.

Referenced by initialize(), foedus::savepoint::SavepointManagerPimpl::savepoint_main(), and foedus::savepoint::SavepointManagerPimpl::take_savepoint_after_snapshot().

Epoch::EpochInteger foedus::savepoint::SavepointManagerControlBlock::requested_durable_epoch_

Client SOC sets this value and then wakes up the savepoint thread.

The value indicates the epoch upto which loggers made sure all log files are durable. So, as soon as we take a savepoint, this officially becomes the new global durable epoch.

Definition at line 71 of file savepoint_manager_pimpl.hpp.

Referenced by foedus::savepoint::SavepointManagerPimpl::get_requested_durable_epoch(), foedus::savepoint::SavepointManagerPimpl::initialize_once(), foedus::savepoint::SavepointManagerPimpl::savepoint_main(), and foedus::savepoint::SavepointManagerPimpl::take_savepoint().

soc::SharedPolling foedus::savepoint::SavepointManagerControlBlock::save_done_event_

Whenever a savepoint has been taken, this event is fired.

The thread that has requested the savepoint sleeps on this.

Definition at line 77 of file savepoint_manager_pimpl.hpp.

Referenced by initialize(), foedus::savepoint::SavepointManagerPimpl::savepoint_main(), foedus::savepoint::SavepointManagerPimpl::take_savepoint(), and foedus::savepoint::SavepointManagerPimpl::take_savepoint_after_snapshot().

soc::SharedPolling foedus::savepoint::SavepointManagerControlBlock::save_wakeup_
Epoch::EpochInteger foedus::savepoint::SavepointManagerControlBlock::saved_durable_epoch_
soc::SharedMutex foedus::savepoint::SavepointManagerControlBlock::savepoint_mutex_

Read/write to savepoint_ is protected with this mutex.

There is anyway only one writer to savepoint_, but this is required to make sure readers don't see half-updated garbage.

Definition at line 84 of file savepoint_manager_pimpl.hpp.

Referenced by foedus::savepoint::SavepointManagerPimpl::get_logger_savepoint(), initialize(), uninitialize(), and foedus::savepoint::SavepointManagerPimpl::update_shared_savepoint().


The documentation for this struct was generated from the following file: