![]() |
Storage Engine API
|
call go() to execute a recovery from existing journal files. More...
#include <dur_recover.h>
call go() to execute a recovery from existing journal files.
Classes | |
| class | Last |
Public Member Functions | |
| RecoveryJob () | |
| ~RecoveryJob () | |
| void | go (OperationContext *opCtx, std::vector< boost::filesystem::path > &files) |
| void | processSection (OperationContext *opCtx, const JSectHeader *h, const void *data, unsigned len, const JSectFooter *f) |
| void | close (OperationContext *opCtx) |
Static Public Member Functions | |
| static RecoveryJob & | get () |
Private Member Functions | |
| MONGO_DISALLOW_COPYING (RecoveryJob) | |
| void | write (Last &last, const ParsedJournalEntry &entry) |
| void | applyEntry (Last &last, const ParsedJournalEntry &entry, bool apply, bool dump) |
| void | applyEntries (OperationContext *opCtx, const std::vector< ParsedJournalEntry > &entries) |
| bool | processFileBuffer (OperationContext *opCtx, const void *, unsigned len) |
| apply a specific journal file, that is already mmap'd More... | |
| bool | processFile (OperationContext *opCtx, boost::filesystem::path journalfile) |
| apply a specific journal file More... | |
| void | _close (OperationContext *opCtx) |
Private Attributes | |
| stdx::mutex | _mx |
| std::list< std::shared_ptr< DurableMappedFile > > | _mmfs |
| bool | _recovering |
| unsigned long long | _lastDataSyncedFromLastRun |
| unsigned long long | _lastSeqSkipped |
| bool | _appliedAnySections |
Static Private Attributes | |
| static RecoveryJob & | _instance = *(new RecoveryJob()) |
| mongo::dur::RecoveryJob::RecoveryJob | ( | ) |
| mongo::dur::RecoveryJob::~RecoveryJob | ( | ) |
|
private |
|
private |
|
private |
| void mongo::dur::RecoveryJob::close | ( | OperationContext * | opCtx | ) |
|
inlinestatic |
| void mongo::dur::RecoveryJob::go | ( | OperationContext * | opCtx, |
| std::vector< boost::filesystem::path > & | files | ||
| ) |
| files | all the j._0 style files we need to apply for recovery |
|
private |
|
private |
apply a specific journal file
|
private |
apply a specific journal file, that is already mmap'd
| p | start of the memory mapped file |
| void mongo::dur::RecoveryJob::processSection | ( | OperationContext * | opCtx, |
| const JSectHeader * | h, | ||
| const void * | data, | ||
| unsigned | len, | ||
| const JSectFooter * | f | ||
| ) |
| data | data between header and footer. compressed if recovering. |
TEMP uncomment RARELY OCCASIONALLY { if( entries.capacity() > 2048 ) { entries.shrink_to_fit(); entries.reserve(2048); } }
|
private |
|
private |
|
staticprivate |
|
private |
|
private |
|
private |
|
private |
|
private |