the writeahead journal for durability
More...
#include <dur_journalimpl.h>
the writeahead journal for durability
◆ Journal()
mongo::dur::Journal::Journal |
( |
| ) |
|
◆ _open()
void mongo::dur::Journal::_open |
( |
| ) |
|
|
private |
◆ _rotate()
void mongo::dur::Journal::_rotate |
( |
unsigned long long |
lsnOfCurrentJournalEntry | ) |
|
|
private |
check if time to rotate files.
assure a file is open. internally called with every commit
◆ assureLogFileOpen()
void mongo::dur::Journal::assureLogFileOpen |
( |
| ) |
|
|
inline |
◆ cleanup()
void mongo::dur::Journal::cleanup |
( |
bool |
log | ) |
|
◆ closeCurrentJournalFile()
void mongo::dur::Journal::closeCurrentJournalFile |
( |
| ) |
|
|
private |
◆ curFileId()
unsigned long long mongo::dur::Journal::curFileId |
( |
| ) |
const |
|
inline |
◆ getFilePathFor()
boost::filesystem::path mongo::dur::Journal::getFilePathFor |
( |
int |
filenumber | ) |
const |
◆ init()
void mongo::dur::Journal::init |
( |
ClockSource * |
cs, |
|
|
int64_t |
serverStartMs |
|
) |
| |
◆ journal()
append to the journal file
◆ open()
void mongo::dur::Journal::open |
( |
| ) |
|
open a journal file to journal operations to.
◆ removeUnneededJournalFiles()
void mongo::dur::Journal::removeUnneededJournalFiles |
( |
| ) |
|
|
private |
remove older journal files.
be in _curLogFileMutex but not dbMutex when calling
◆ rotate()
void mongo::dur::Journal::rotate |
( |
| ) |
|
check if time to rotate files.
assure a file is open. done separately from the journal() call as we can do this part outside of lock. thread: durThread()
◆ updateLSNFile()
void mongo::dur::Journal::updateLSNFile |
( |
unsigned long long |
lsnOfCurrentJournalEntry | ) |
|
|
private |
remember "last sequence number" to speed recoveries concurrency: called by durThread only.
◆ notifyPostDataFileFlush
void notifyPostDataFileFlush |
( |
| ) |
|
|
friend |
◆ notifyPreDataFileFlush
void notifyPreDataFileFlush |
( |
| ) |
|
|
friend |
Call these before (pre) and after (post) the datafiles are flushed to disk by the DataFileSync thread.
These should not be called for any other flushes.
◆ setLastSeqNumberWrittenToSharedView
void setLastSeqNumberWrittenToSharedView |
( |
uint64_t |
seqNumber | ) |
|
|
friend |
Informs the journaling system that all writes on or before the passed in sequence number have been written to the data files' shared mmap view.
◆ _clock
ClockSource* mongo::dur::Journal::_clock |
|
private |
◆ _curFileId
unsigned long long mongo::dur::Journal::_curFileId |
|
private |
◆ _curLogFile
LogFile* mongo::dur::Journal::_curLogFile |
|
private |
◆ _curLogFileMutex
SimpleMutex mongo::dur::Journal::_curLogFileMutex |
|
private |
◆ _lastFlushTime
AtomicUInt64 mongo::dur::Journal::_lastFlushTime |
|
private |
◆ _lastSeqNumberWrittenToSharedView
AtomicUInt64 mongo::dur::Journal::_lastSeqNumberWrittenToSharedView |
|
private |
◆ _nextFileNumber
unsigned mongo::dur::Journal::_nextFileNumber = 0 |
|
private |
◆ _oldJournalFiles
std::list<JFile> mongo::dur::Journal::_oldJournalFiles |
|
private |
◆ _preFlushTime
AtomicUInt64 mongo::dur::Journal::_preFlushTime |
|
private |
◆ _serverStartMs
int64_t mongo::dur::Journal::_serverStartMs |
|
private |
◆ _writeToLSNNeeded
AtomicWord<bool> mongo::dur::Journal::_writeToLSNNeeded |
|
private |
◆ _written
unsigned long long mongo::dur::Journal::_written = 0 |
|
private |
◆ dir
std::string mongo::dur::Journal::dir |
The documentation for this class was generated from the following files:
- /home/louis/git/mongodbsource.github.io/src/src/mongo/db/storage/mmap_v1/dur_journalimpl.h
- /home/louis/git/mongodbsource.github.io/src/src/mongo/db/storage/mmap_v1/dur_journal.cpp