libfoedus-core
FOEDUS Core Library
|
A thread-buffer's epoch marker, which indicates where a thread switched an epoch. More...
A thread-buffer's epoch marker, which indicates where a thread switched an epoch.
When the thread publishes a commited log with new epoch, it adds this mark for logger. Unlike logger's epoch mark, we don't write out actual log entry for this. Epoch mark is stored for only non-durable regions. Thus, the logger doesn't have to worry about whether the marked offset is still valid or not.
Definition at line 45 of file thread_log_buffer.hpp.
#include <thread_log_buffer.hpp>
Public Member Functions | |
ThreadEpockMark () | |
ThreadEpockMark (Epoch old_epoch, Epoch new_epoch, uint64_t offset_begin) | |
Public Attributes | |
Epoch | old_epoch_ |
The value of new_epoch_ of the previous mark. More... | |
Epoch | new_epoch_ |
The epoch of log entries this mark represents. More... | |
uint64_t | offset_begin_ |
Where the new epoch starts. More... | |
uint64_t | offset_end_ |
Where the new epoch ends. More... | |
Friends | |
std::ostream & | operator<< (std::ostream &o, const ThreadEpockMark &v) |
|
inline |
Definition at line 76 of file thread_log_buffer.hpp.
References foedus::Epoch::reset().
|
inline |
Definition at line 82 of file thread_log_buffer.hpp.
|
friend |
Definition at line 363 of file thread_log_buffer.cpp.
Epoch foedus::log::ThreadEpockMark::new_epoch_ |
The epoch of log entries this mark represents.
Because a thread might have no log in some epoch, this might be larger than old_epoch+1. It might be old_epoch+1000 etc. Populated as soon as this mark becomes the current and immutable since then.
Definition at line 61 of file thread_log_buffer.hpp.
Referenced by foedus::log::ThreadLogBufferMeta::assert_consistent(), foedus::log::ThreadLogBuffer::get_last_epoch(), foedus::log::ThreadLogBuffer::get_logs_to_write(), foedus::log::ThreadLogBuffer::on_log_written(), and foedus::log::operator<<().
uint64_t foedus::log::ThreadEpockMark::offset_begin_ |
Where the new epoch starts.
Populated as soon as this mark becomes the current and immutable since then.
Definition at line 66 of file thread_log_buffer.hpp.
Referenced by foedus::log::ThreadLogBufferMeta::assert_consistent(), foedus::log::ThreadLogBuffer::get_logs_to_write(), foedus::log::ThreadLogBuffer::on_log_written(), and foedus::log::operator<<().
uint64_t foedus::log::ThreadEpockMark::offset_end_ |
Where the new epoch ends.
Populated 1) when the thread retires the epoch ("0" while this mark is current) OR 2) when the logger aggressively determines that the thread is idle and will not emit any more logs in this epoch. Thus, when the thread writes this value to move on to next entry, the old value must be 0 or the same value it were to write.
Definition at line 74 of file thread_log_buffer.hpp.
Referenced by foedus::log::ThreadLogBufferMeta::assert_consistent(), foedus::log::ThreadLogBuffer::get_logs_to_write(), foedus::log::ThreadLogBuffer::on_log_written(), and foedus::log::operator<<().
Epoch foedus::log::ThreadEpockMark::old_epoch_ |
The value of new_epoch_ of the previous mark.
This is not currently used except sanity checks. Populated as soon as this mark becomes the current and immutable since then.
Definition at line 52 of file thread_log_buffer.hpp.
Referenced by foedus::log::ThreadLogBufferMeta::assert_consistent(), and foedus::log::operator<<().