Storage Engine API
dur_recover.cpp File Reference
#include "mongo/platform/basic.h"
#include "mongo/db/storage/mmap_v1/dur_recover.h"
#include <cstring>
#include <fcntl.h>
#include <iomanip>
#include <iostream>
#include <sys/stat.h>
#include "mongo/db/client.h"
#include "mongo/db/concurrency/d_concurrency.h"
#include "mongo/db/operation_context.h"
#include "mongo/db/storage/mmap_v1/compress.h"
#include "mongo/db/storage/mmap_v1/dur_commitjob.h"
#include "mongo/db/storage/mmap_v1/dur_journal.h"
#include "mongo/db/storage/mmap_v1/dur_journalformat.h"
#include "mongo/db/storage/mmap_v1/dur_stats.h"
#include "mongo/db/storage/mmap_v1/durable_mapped_file.h"
#include "mongo/db/storage/mmap_v1/durop.h"
#include "mongo/db/storage/mmap_v1/mmap_v1_options.h"
#include "mongo/platform/strnlen.h"
#include "mongo/util/bufreader.h"
#include "mongo/util/checksum.h"
#include "mongo/util/destructor_guard.h"
#include "mongo/util/exit.h"
#include "mongo/util/hex.h"
#include "mongo/util/log.h"
#include "mongo/util/mongoutils/str.h"
#include "mongo/util/scopeguard.h"
#include "mongo/util/startup_test.h"

Classes

class  mongo::JournalSectionCorruptException
 Thrown when a journal section is corrupt. More...
 
struct  mongo::dur::ParsedJournalEntry
 
class  mongo::dur::JournalSectionIterator
 read through the memory mapped data of a journal file (journal/j._<n> file) throws More...
 
struct  mongo::dur::BufReaderY
 
class  mongo::dur::BufReaderUnitTest
 

Namespaces

 mongo
 Copyright (C) 2014 MongoDB Inc.
 
 mongo::dur
 

Macros

#define MONGO_LOG_DEFAULT_COMPONENT   ::mongo::logger::LogComponent::kJournal
 Copyright (C) 2009 10gen Inc. More...
 

Functions

void mongo::dur::removeJournalFiles ()
 throws More...
 
boost::filesystem::path mongo::dur::getJournalDir ()
 
static void mongo::dur::getFiles (boost::filesystem::path dir, vector< boost::filesystem::path > &files)
 Get journal filenames, in order. More...
 
static string mongo::dur::fileName (const char *dbName, int fileNo)
 
void mongo::dur::_recover (OperationContext *opCtx)
 
void mongo::dur::replayJournalFilesAtStartup ()
 recover from a crash called during startup throws on error More...
 

Variables

mongo::dur::BufReaderUnitTest mongo::dur::brunittest
 

Macro Definition Documentation

◆ MONGO_LOG_DEFAULT_COMPONENT

#define MONGO_LOG_DEFAULT_COMPONENT   ::mongo::logger::LogComponent::kJournal

Copyright (C) 2009 10gen Inc.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License, version 3, as published by the Free Software Foundation.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program. If not, see http://www.gnu.org/licenses/.

As a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library under certain conditions as described in each individual source file and distribute linked combinations including the program with the OpenSSL library. You must comply with the GNU Affero General Public License in all respects for all of the code used other than as permitted herein. If you modify file(s) with this exception, you may extend this exception to your version of the file(s), but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. If you delete this exception statement from all source files in the program, then also delete it in the license file.