![]() |
Storage Engine API
|
#include "mongo/platform/basic.h"
#include "mongo/db/storage/mmap_v1/dur_journal.h"
#include <boost/filesystem.hpp>
#include <boost/filesystem/operations.hpp>
#include "mongo/base/init.h"
#include "mongo/base/static_assert.h"
#include "mongo/config.h"
#include "mongo/db/client.h"
#include "mongo/db/storage/mmap_v1/aligned_builder.h"
#include "mongo/db/storage/mmap_v1/compress.h"
#include "mongo/db/storage/mmap_v1/dur_journalformat.h"
#include "mongo/db/storage/mmap_v1/dur_journalimpl.h"
#include "mongo/db/storage/mmap_v1/dur_stats.h"
#include "mongo/db/storage/mmap_v1/logfile.h"
#include "mongo/db/storage/mmap_v1/mmap.h"
#include "mongo/db/storage/mmap_v1/mmap_v1_options.h"
#include "mongo/db/storage/mmap_v1/paths.h"
#include "mongo/db/storage/storage_options.h"
#include "mongo/platform/random.h"
#include "mongo/util/checksum.h"
#include "mongo/util/clock_source.h"
#include "mongo/util/exit.h"
#include "mongo/util/file.h"
#include "mongo/util/hex.h"
#include "mongo/util/log.h"
#include "mongo/util/mongoutils/str.h"
#include "mongo/util/progress_meter.h"
#include "mongo/util/timer.h"
Namespaces | |
mongo | |
Copyright (C) 2014 MongoDB Inc. | |
mongo::dur | |
Macros | |
#define | MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kJournal |
Copyright (C) 2010 10gen Inc. More... | |
Functions | |
MONGO_INITIALIZER() | mongo::dur::InitializeJournalingParams (InitializerContext *context) |
mongo::dur::MONGO_STATIC_ASSERT (sizeof(Checksum)==16) | |
mongo::dur::MONGO_STATIC_ASSERT (sizeof(JHeader)==8192) | |
mongo::dur::MONGO_STATIC_ASSERT (sizeof(JSectHeader)==20) | |
mongo::dur::MONGO_STATIC_ASSERT (sizeof(JSectFooter)==32) | |
mongo::dur::MONGO_STATIC_ASSERT (sizeof(JEntry)==12) | |
mongo::dur::MONGO_STATIC_ASSERT (sizeof(LSNFile)==88) | |
void | mongo::dur::removeOldJournalFile (boost::filesystem::path p) |
boost::filesystem::path | mongo::dur::getJournalDir () |
boost::filesystem::path | mongo::dur::lsnPath () |
void | mongo::dur::journalingFailure (const char *msg) |
this should be called when something really bad happens so that we can flag appropriately More... | |
bool | mongo::dur::haveJournalFiles (bool anyFiles) |
never throws More... | |
void | mongo::dur::removeJournalFiles () |
throws More... | |
void | mongo::dur::journalCleanup (bool log=false) |
at termination after db files closed & fsynced also after recovery closes and removes journal files More... | |
bool | mongo::dur::_preallocateIsFaster () |
bool | mongo::dur::preallocateIsFaster () |
void | mongo::dur::preallocateFile (boost::filesystem::path p, unsigned long long len) |
boost::filesystem::path | mongo::dur::preallocPath (int n) |
void | mongo::dur::_preallocateFiles () |
void | mongo::dur::checkFreeSpace () |
void | mongo::dur::preallocateFiles () |
boost::filesystem::path | mongo::dur::findPrealloced () |
void | mongo::dur::journalMakeDir (ClockSource *cs, int64_t serverStartMs) |
assure journal/ dir exists. More... | |
unsigned long long | mongo::dur::journalReadLSN () |
called during recovery (the error message text below assumes that) More... | |
uint64_t | mongo::dur::generateNextSeqNumber (ClockSource *cs, int64_t serverStartMs) |
Generates the next sequence number for use in the journal, guaranteed to be greater than all prior sequence numbers. More... | |
void | mongo::dur::setLastSeqNumberWrittenToSharedView (uint64_t seqNumber) |
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. More... | |
void | mongo::dur::notifyPreDataFileFlush () |
Call these before (pre) and after (post) the datafiles are flushed to disk by the DataFileSync thread. More... | |
void | mongo::dur::notifyPostDataFileFlush () |
void | mongo::dur::WRITETOJOURNAL (const JSectHeader &h, const AlignedBuilder &uncompressed) |
write (append) the buffer we have built to the journal and fsync it. More... | |
Variables | |
unsigned long long | mongo::dur::DataLimitPerJournalFile |
bool | mongo::dur::usingPreallocate = false |
Journal | mongo::dur::j |
const unsigned long long | mongo::dur::LsnShutdownSentinel = ~((unsigned long long)0) |
bool | mongo::dur::okToCleanUp = false |
at clean shutdown More... | |
const int | mongo::dur::NUM_PREALLOC_FILES = 3 |
#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kJournal |
Copyright (C) 2010 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.