58 "Latest epoch whose logs were all flushed to disk");
60 "The earliest epoch that can exist in this system");
63 "The most recently snapshot-ed epoch, all logs upto this epoch is safe to delete.");
65 "Offset from which metadata log entries are not gleaned yet");
67 "Offset upto which metadata log entries are fsynced");
69 "Ordinal of the oldest active log file in each logger");
71 "Indicates the inclusive beginning of active region in the oldest log file");
73 "Indicates the log file each logger is currently appending to");
75 "Indicates the exclusive end of durable region in the current log file");
96 uint16_t loggers_per_node_count,
108 for (uint32_t i = 0; i < count; ++i) {
#define EXTERNALIZE_LOAD_ELEMENT(element, attribute)
Reads a child xml element to load a member variable of this object.
std::vector< uint64_t > oldest_log_files_offset_begin_
Indicates the inclusive beginning of active region in the oldest log file.
Epoch::EpochInteger current_epoch_
The first epoch (before wrap-around) that might have transactions is ep-3.
Root package of FOEDUS (Fast Optimistic Engine for Data Unification Services).
std::vector< uint64_t > current_log_files_offset_durable_
Indicates the exclusive end of durable region in the current log file.
snapshot::SnapshotId latest_snapshot_id_
uint64_t meta_log_durable_offset_
Savepoint()
Constructs an empty savepoint.
log::LogFileOrdinal oldest_log_file_
Ordinal of the oldest active log file in each logger.
Epoch::EpochInteger current_epoch_
Current epoch of the entire engine.
Brings error stacktrace information as return value of functions.
The information we maintain in savepoint manager and externalize to a file.
static ErrorStack insert_comment(tinyxml2::XMLElement *element, const std::string &comment)
uint64_t meta_log_oldest_offset_
Offset from which metadata log entries are not gleaned yet.
uint64_t meta_log_durable_offset_
Offset upto which metadata log entries are fsynced.
uint64_t oldest_log_file_offset_begin_
Indicates the inclusive beginning of active region in the oldest log file.
Zero is always reserved for invalid epoch.
uint64_t current_log_file_offset_durable_
Indicates the exclusive end of durable region in the current log file.
Epoch::EpochInteger latest_snapshot_epoch_
ErrorStack save(tinyxml2::XMLElement *element) const override
Writes the content of this object to the given XML element.
uint64_t meta_log_oldest_offset_
ErrorStack load(tinyxml2::XMLElement *element) override
Reads the content of this object from the given XML element.
Epoch::EpochInteger latest_snapshot_epoch_
The most recently snapshot-ed epoch, all logs upto this epoch is safe to delete.
log::LogFileOrdinal current_log_file_
Indicates the log file each logger is currently appending to.
Epoch::EpochInteger durable_epoch_
void populate_empty(log::LoggerId logger_count)
Populate variables as an initial state.
const SnapshotId kNullSnapshotId
#define CHECK_ERROR(x)
This macro calls x and checks its returned value.
Epoch::EpochInteger earliest_epoch_
The earliest epoch that can exist in this system.
const ErrorStack kRetOk
Normal return value for no-error case.
uint16_t loggers_per_node_count_
Number of loggers per node.
std::vector< log::LogFileOrdinal > oldest_log_files_
Ordinal of the oldest active log file in each logger.
As there is no transaction in ep-1, initial durable_epoch is 1.
void assert_epoch_values() const
Check invariants on current_epoch_/durable_epoch_.
#define EXTERNALIZE_SAVE_ELEMENT(element, attribute, comment)
Adds an xml element to represent a member variable of this object.
LoggerSavepointInfo logger_info_[1U<< 16]
Stores all loggers' information.
Epoch::EpochInteger earliest_epoch_
#define ASSERT_ND(x)
A warning-free wrapper macro of assert() that has no performance effect in release mode even when 'x'...
uint32_t get_total_logger_count() const
snapshot::SnapshotId latest_snapshot_id_
The most recent complete snapshot.
Epoch::EpochInteger durable_epoch_
Latest epoch whose logs were all flushed to disk.
uint16_t LoggerId
Typedef for an ID of Logger.
std::vector< log::LogFileOrdinal > current_log_files_
Indicates the log file each logger is currently appending to.
uint16_t node_count_
Number of NUMA nodes.
void update(uint16_t node_count, uint16_t loggers_per_node_count, const Savepoint &src)
Write out the content of the given Savepoint to this object.