libfoedus-core
FOEDUS Core Library
|
A dummy log type to fill up a sector in log files. More...
A dummy log type to fill up a sector in log files.
As we do direct I/O, we must do file I/O in multiply of 4kb. We pad the log buffer we are about to write with this log type. Log gleaner simply skips this log. This is the only log type whose size might be smaller than sizeof(FillerLogType). This happens because the common log header is 16 bytes but we have to make this log type 8 bytes able to fill every gap. For this reason, the xct_id_ property of this log must not be used.
Definition at line 215 of file common_log_types.hpp.
#include <common_log_types.hpp>
Public Types | |
enum | Constants { kLogWriteUnitSize = 1 << 12 } |
Constant values. More... | |
Public Member Functions | |
FillerLogType ()=delete | |
FillerLogType (const FillerLogType &other)=delete | |
~FillerLogType ()=delete | |
bool | is_engine_log () const |
bool | is_storage_log () const |
bool | is_record_log () const |
void | apply_engine (thread::Thread *) |
void | apply_storage (Engine *, storage::StorageId) |
void | apply_record (thread::Thread *, storage::StorageId, xct::RwLockableXctId *, char *) |
void | populate (uint64_t size) |
Populate this log to fill up the specified byte size. More... | |
void | assert_valid () const __attribute__((always_inline)) |
Friends | |
std::ostream & | operator<< (std::ostream &o, const FillerLogType &v) |
Additional Inherited Members | |
![]() | |
LogHeader | header_ |
Constant values.
Enumerator | |
---|---|
kLogWriteUnitSize |
We always write to file in a multiply of this value, filling up the rest if needed. 4kb Disk Sector (512b earlier, but nowadays 4kb especially on SSD). |
Definition at line 217 of file common_log_types.hpp.
|
delete |
|
delete |
|
delete |
|
inline |
Definition at line 231 of file common_log_types.hpp.
|
inline |
Definition at line 233 of file common_log_types.hpp.
|
inline |
Definition at line 232 of file common_log_types.hpp.
|
inline |
Definition at line 242 of file common_log_types.hpp.
References ASSERT_ND, and foedus::log::kLogCodeFiller.
|
inline |
Definition at line 228 of file common_log_types.hpp.
|
inline |
Definition at line 230 of file common_log_types.hpp.
|
inline |
Definition at line 229 of file common_log_types.hpp.
void foedus::log::FillerLogType::populate | ( | uint64_t | size | ) |
Populate this log to fill up the specified byte size.
Definition at line 77 of file common_log_types.cpp.
References ASSERT_ND, foedus::log::BaseLogType::header_, foedus::log::LogHeader::log_length_, foedus::log::LogHeader::log_type_code_, and foedus::log::LogHeader::storage_id_.
|
friend |
Definition at line 37 of file common_log_types.cpp.