summaryrefslogtreecommitdiff
path: root/src/mongo/db/storage
diff options
context:
space:
mode:
authorMark Benvenuto <mark.benvenuto@mongodb.com>2015-07-28 19:55:13 -0400
committerMark Benvenuto <mark.benvenuto@mongodb.com>2015-07-29 17:23:36 -0400
commit05c1738b852d3c4c309d001e5b4c9b1c06220904 (patch)
treec1460a5fb5eb2e6a922b390da3f8cb3a9ab9648e /src/mongo/db/storage
parentb66e993f1c742518d9b5e93b0d8a5f8255a4127c (diff)
downloadmongo-05c1738b852d3c4c309d001e5b4c9b1c06220904.tar.gz
SERVER-18978: Clang-Format - Fix comment word wrapping indentation
Diffstat (limited to 'src/mongo/db/storage')
-rw-r--r--src/mongo/db/storage/mmap_v1/aligned_builder.cpp4
-rw-r--r--src/mongo/db/storage/mmap_v1/btree/btree_logic_test.cpp8
-rw-r--r--src/mongo/db/storage/mmap_v1/btree/key.cpp6
-rw-r--r--src/mongo/db/storage/mmap_v1/btree/key.h5
-rw-r--r--src/mongo/db/storage/mmap_v1/catalog/namespace.h10
-rw-r--r--src/mongo/db/storage/mmap_v1/catalog/namespace_details.h4
-rw-r--r--src/mongo/db/storage/mmap_v1/data_file.h5
-rw-r--r--src/mongo/db/storage/mmap_v1/diskloc.h12
-rw-r--r--src/mongo/db/storage/mmap_v1/dur.cpp25
-rw-r--r--src/mongo/db/storage/mmap_v1/dur_journal.cpp8
-rw-r--r--src/mongo/db/storage/mmap_v1/dur_journalformat.h28
-rw-r--r--src/mongo/db/storage/mmap_v1/dur_journalimpl.h4
-rw-r--r--src/mongo/db/storage/mmap_v1/dur_preplogbuffer.cpp4
-rw-r--r--src/mongo/db/storage/mmap_v1/dur_recover.cpp6
-rw-r--r--src/mongo/db/storage/mmap_v1/dur_stats.h5
-rw-r--r--src/mongo/db/storage/mmap_v1/durable_mapped_file.cpp11
-rw-r--r--src/mongo/db/storage/mmap_v1/durable_mapped_file.h9
-rw-r--r--src/mongo/db/storage/mmap_v1/durop.cpp6
-rw-r--r--src/mongo/db/storage/mmap_v1/durop.h6
-rw-r--r--src/mongo/db/storage/mmap_v1/extent.h3
-rw-r--r--src/mongo/db/storage/mmap_v1/journal_latency_test_cmd.cpp3
-rw-r--r--src/mongo/db/storage/mmap_v1/mmap_v1_extent_manager.cpp4
-rw-r--r--src/mongo/db/storage/mmap_v1/record.h9
-rw-r--r--src/mongo/db/storage/mmap_v1/record_store_v1_base.cpp3
24 files changed, 107 insertions, 81 deletions
diff --git a/src/mongo/db/storage/mmap_v1/aligned_builder.cpp b/src/mongo/db/storage/mmap_v1/aligned_builder.cpp
index 8742f25e285..bee3fb4f86a 100644
--- a/src/mongo/db/storage/mmap_v1/aligned_builder.cpp
+++ b/src/mongo/db/storage/mmap_v1/aligned_builder.cpp
@@ -134,8 +134,8 @@ void AlignedBuilder::_malloc(unsigned sz) {
_p._allocationAddress = p;
_p._data = (char*)p;
#elif defined(__linux__)
- // in theory #ifdef _POSIX_VERSION should work, but it doesn't on OS X 10.4, and needs to be tested on solaris.
- // so for now, linux only for this.
+ // in theory #ifdef _POSIX_VERSION should work, but it doesn't on OS X 10.4, and needs to be
+ // tested on solaris. so for now, linux only for this.
void* p = 0;
int res = posix_memalign(&p, Alignment, sz);
massert(13524, "out of memory AlignedBuilder", res == 0);
diff --git a/src/mongo/db/storage/mmap_v1/btree/btree_logic_test.cpp b/src/mongo/db/storage/mmap_v1/btree/btree_logic_test.cpp
index 317ab5919cd..55acad840af 100644
--- a/src/mongo/db/storage/mmap_v1/btree/btree_logic_test.cpp
+++ b/src/mongo/db/storage/mmap_v1/btree/btree_logic_test.cpp
@@ -2382,10 +2382,10 @@ public:
}
// too much work to try to make this happen through inserts and deletes
// we are intentionally manipulating the btree bucket directly here
- BtreeBucket::Loc* L = const_cast< BtreeBucket::Loc* >( &bt()->keyNode( 1 ).prevChildBucket );
- writing(L)->Null();
- writingInt( const_cast< BtreeBucket::Loc& >( bt()->keyNode( 1 ).recordLoc ).GETOFS() ) |= 1; // make unused
- BSONObj k = BSON( "a" << toInsert );
+ BtreeBucket::Loc* L = const_cast< BtreeBucket::Loc* >( &bt()->keyNode( 1
+ ).prevChildBucket ); writing(L)->Null();
+ writingInt( const_cast< BtreeBucket::Loc& >( bt()->keyNode( 1 ).recordLoc ).GETOFS() )
+ |= 1; // make unused BSONObj k = BSON( "a" << toInsert );
Base::insert( k );
}
};
diff --git a/src/mongo/db/storage/mmap_v1/btree/key.cpp b/src/mongo/db/storage/mmap_v1/btree/key.cpp
index baa934c525f..915171d4b0e 100644
--- a/src/mongo/db/storage/mmap_v1/btree/key.cpp
+++ b/src/mongo/db/storage/mmap_v1/btree/key.cpp
@@ -197,7 +197,8 @@ int KeyBson::woCompare(const KeyBson& r, const Ordering& o) const {
return oldCompare(_o, r._o, o);
}
-// woEqual could be made faster than woCompare but this is for backward compatibility so not worth a big effort
+// woEqual could be made faster than woCompare but this is for backward compatibility so not worth a
+// big effort
bool KeyBson::woEqual(const KeyBson& r) const {
return oldCompare(_o, r._o, nullOrdering) == 0;
}
@@ -495,7 +496,8 @@ static int compare(const unsigned char*& l, const unsigned char*& r) {
int llen = binDataCodeToLength(L);
int diff = L - R; // checks length and subtype simultaneously
if (diff) {
- // unfortunately nibbles are backwards to do subtype and len in one check (could bit swap...)
+ // unfortunately nibbles are backwards to do subtype and len in one check (could bit
+ // swap...)
int rlen = binDataCodeToLength(R);
if (llen != rlen)
return llen - rlen;
diff --git a/src/mongo/db/storage/mmap_v1/btree/key.h b/src/mongo/db/storage/mmap_v1/btree/key.h
index 4787d83281a..d6546a76d77 100644
--- a/src/mongo/db/storage/mmap_v1/btree/key.h
+++ b/src/mongo/db/storage/mmap_v1/btree/key.h
@@ -83,8 +83,9 @@ class KeyV1Owned;
class KeyV1 {
void operator=(
const KeyV1&); // disallowed just to make people be careful as we don't own the buffer
- KeyV1(
- const KeyV1Owned&); // disallowed as this is not a great idea as KeyV1Owned likely will go out of scope
+ // disallowed as this is not a great idea as KeyV1Owned likely will go out of scope
+ KeyV1(const KeyV1Owned&);
+
public:
KeyV1() {
_keyData = 0;
diff --git a/src/mongo/db/storage/mmap_v1/catalog/namespace.h b/src/mongo/db/storage/mmap_v1/catalog/namespace.h
index d24f576bb01..d854eeff989 100644
--- a/src/mongo/db/storage/mmap_v1/catalog/namespace.h
+++ b/src/mongo/db/storage/mmap_v1/catalog/namespace.h
@@ -84,12 +84,12 @@ public:
return buf;
}
- /* NamespaceDetails::Extra was added after fact to allow chaining of data blocks to support more than 10 indexes
- (more than 10 IndexDetails). It's a bit hacky because of this late addition with backward
- file support. */
+ /* NamespaceDetails::Extra was added after fact to allow chaining of data blocks to support more
+ * than 10 indexes (more than 10 IndexDetails). It's a bit hacky because of this late addition
+ * with backward file support. */
std::string extraName(int i) const;
- bool isExtra()
- const; /* ends with $extr... -- when true an extra block not a normal NamespaceDetails block */
+ /* ends with $extr... -- when true an extra block not a normal NamespaceDetails block */
+ bool isExtra() const;
enum MaxNsLenValue {
// Maximum possible length of name any namespace, including special ones like $extra.
diff --git a/src/mongo/db/storage/mmap_v1/catalog/namespace_details.h b/src/mongo/db/storage/mmap_v1/catalog/namespace_details.h
index 42ca38a36e2..1aee8f9ad1a 100644
--- a/src/mongo/db/storage/mmap_v1/catalog/namespace_details.h
+++ b/src/mongo/db/storage/mmap_v1/catalog/namespace_details.h
@@ -97,8 +97,8 @@ public:
DiskLoc capExtent; // the "current" extent we're writing too for a capped collection
DiskLoc capFirstNewRecord;
- unsigned short
- _dataFileVersion; // NamespaceDetails version. So we can do backward compatibility in the future. See filever.h
+ // NamespaceDetails version. So we can do backward compatibility in the future. See filever.h
+ unsigned short _dataFileVersion;
unsigned short _indexFileVersion;
unsigned long long multiKeyIndexBits;
diff --git a/src/mongo/db/storage/mmap_v1/data_file.h b/src/mongo/db/storage/mmap_v1/data_file.h
index 64df4ebdd61..a78ac911c5b 100644
--- a/src/mongo/db/storage/mmap_v1/data_file.h
+++ b/src/mongo/db/storage/mmap_v1/data_file.h
@@ -126,8 +126,9 @@ class DataFileHeader {
public:
DataFileVersion version;
int fileLength;
- DiskLoc
- unused; /* unused is the portion of the file that doesn't belong to any allocated extents. -1 = no more */
+ /* unused is the portion of the file that doesn't belong to any allocated extents. -1 = no more
+ * */
+ DiskLoc unused;
int unusedLength;
DiskLoc freeListStart;
DiskLoc freeListEnd;
diff --git a/src/mongo/db/storage/mmap_v1/diskloc.h b/src/mongo/db/storage/mmap_v1/diskloc.h
index 1e4d8649022..9f49a39e5d1 100644
--- a/src/mongo/db/storage/mmap_v1/diskloc.h
+++ b/src/mongo/db/storage/mmap_v1/diskloc.h
@@ -52,12 +52,15 @@ class BtreeBucket;
(such as adding a virtual function)
*/
class DiskLoc {
- int _a; // this will be volume, file #, etc. but is a logical value could be anything depending on storage engine
+ // this will be volume, file #, etc. but is a logical value could be anything depending on
+ // storage engine
+ int _a;
int ofs;
public:
enum SentinelValues {
- /* note NullOfs is different. todo clean up. see refs to NullOfs in code - use is valid but outside DiskLoc context so confusing as-is. */
+ /* note NullOfs is different. todo clean up. see refs to NullOfs in code - use is valid but
+ * outside DiskLoc context so confusing as-is. */
NullOfs = -1,
// Caps the number of files that may be allocated in a database, allowing about 32TB of
@@ -96,8 +99,9 @@ public:
}
DiskLoc& Null() {
_a = -1;
- ofs =
- 0; /* note NullOfs is different. todo clean up. see refs to NullOfs in code - use is valid but outside DiskLoc context so confusing as-is. */
+ /* note NullOfs is different. todo clean up. see refs to NullOfs in code - use is valid but
+ * outside DiskLoc context so confusing as-is. */
+ ofs = 0;
return *this;
}
void assertOk() const {
diff --git a/src/mongo/db/storage/mmap_v1/dur.cpp b/src/mongo/db/storage/mmap_v1/dur.cpp
index fc0bcdf84c2..cfc5c72db05 100644
--- a/src/mongo/db/storage/mmap_v1/dur.cpp
+++ b/src/mongo/db/storage/mmap_v1/dur.cpp
@@ -34,19 +34,22 @@
we could be in read lock for this
for very large objects write directly to redo log in situ?
WRITETOJOURNAL
- we could be unlocked (the main db lock that is...) for this, with sufficient care, but there is some complexity
- have to handle falling behind which would use too much ram (going back into a read lock would suffice to stop that).
- for now (1.7.5/1.8.0) we are in read lock which is not ideal.
+ we could be unlocked (the main db lock that is...) for this, with sufficient care, but there
+ is some complexity have to handle falling behind which would use too much ram (going back
+ into a read lock would suffice to stop that). for now (1.7.5/1.8.0) we are in read lock which
+ is not ideal.
WRITETODATAFILES
- actually write to the database data files in this phase. currently done by memcpy'ing the writes back to
- the non-private MMF. alternatively one could write to the files the traditional way; however the way our
- storage engine works that isn't any faster (actually measured a tiny bit slower).
+ actually write to the database data files in this phase. currently done by memcpy'ing the
+ writes back to the non-private MMF. alternatively one could write to the files the
+ traditional way; however the way our storage engine works that isn't any faster (actually
+ measured a tiny bit slower).
REMAPPRIVATEVIEW
- we could in a write lock quickly flip readers back to the main view, then stay in read lock and do our real
- remapping. with many files (e.g., 1000), remapping could be time consuming (several ms), so we don't want
- to be too frequent.
- there could be a slow down immediately after remapping as fresh copy-on-writes for commonly written pages will
- be required. so doing these remaps fractionally is helpful.
+ we could in a write lock quickly flip readers back to the main view, then stay in read lock
+ and do our real remapping. with many files (e.g., 1000), remapping could be time consuming
+ (several ms), so we don't want to be too frequent.
+
+ there could be a slow down immediately after remapping as fresh copy-on-writes for commonly
+ written pages will be required. so doing these remaps fractionally is helpful.
mutexes:
diff --git a/src/mongo/db/storage/mmap_v1/dur_journal.cpp b/src/mongo/db/storage/mmap_v1/dur_journal.cpp
index c1e56b9790f..0ab2ff648ca 100644
--- a/src/mongo/db/storage/mmap_v1/dur_journal.cpp
+++ b/src/mongo/db/storage/mmap_v1/dur_journal.cpp
@@ -390,10 +390,10 @@ void _preallocateFiles() {
unsigned long long limit = DataLimitPerJournalFile;
if (debug && i == 1) {
- // moving 32->64, the prealloc files would be short. that is "ok", but we want to exercise that
- // case, so we force exercising here when _DEBUG is set by arbitrarily stopping prealloc at a low
- // limit for a file. also we want to be able to change in the future the constant without a lot of
- // work anyway.
+ // moving 32->64, the prealloc files would be short. that is "ok", but we want to
+ // exercise that case, so we force exercising here when _DEBUG is set by arbitrarily
+ // stopping prealloc at a low limit for a file. also we want to be able to change in
+ // the future the constant without a lot of work anyway.
limit = 16 * 1024 * 1024;
}
preallocateFile(filepath, limit);
diff --git a/src/mongo/db/storage/mmap_v1/dur_journalformat.h b/src/mongo/db/storage/mmap_v1/dur_journalformat.h
index 3c31c2686dd..6392a5600fa 100644
--- a/src/mongo/db/storage/mmap_v1/dur_journalformat.h
+++ b/src/mongo/db/storage/mmap_v1/dur_journalformat.h
@@ -49,11 +49,12 @@ struct JHeader {
JHeader() {}
JHeader(std::string fname);
- char magic
- [2]; // "j\n". j means journal, then a linefeed, fwiw if you were to run "less" on the file or something...
+ // "j\n". j means journal, then a linefeed, fwiw if you were to run "less" on the file or
+ // something...
+ char magic[2];
-// x4142 is asci--readable if you look at the file with head/less -- thus the starting values were near
-// that. simply incrementing the version # is safe on a fwd basis.
+// x4142 is asci--readable if you look at the file with head/less -- thus the starting values were
+// near that. simply incrementing the version # is safe on a fwd basis.
#if defined(_NOCOMPRESS)
enum { CurrentVersion = 0x4148 };
#else
@@ -62,15 +63,15 @@ struct JHeader {
unsigned short _version;
// these are just for diagnostic ease (make header more useful as plain text)
- char n1; // '\n'
- char ts[20]; // ascii timestamp of file generation. for user reading, not used by code.
- char n2; // '\n'
- char dbpath
- [128]; // path/filename of this file for human reading and diagnostics. not used by code.
- char n3, n4; // '\n', '\n'
+ char n1; // '\n'
+ char ts[20]; // ascii timestamp of file generation. for user reading, not used by code.
+ char n2; // '\n'
+ char dbpath[128]; // path/filename of this file for human reading and diagnostics. not used by
+ // code.
+ char n3, n4; // '\n', '\n'
- unsigned long long
- fileId; // unique identifier that will be in each JSectHeader. important as we recycle prealloced files
+ // unique identifier that will be in each JSectHeader. important as we recycle prealloced files
+ unsigned long long fileId;
char reserved3[8026]; // 8KB total for the file header
char txt2[2]; // "\n\n" at the end
@@ -112,7 +113,8 @@ public:
};
/** an individual write operation within a group commit section. Either the entire section should
- be applied, or nothing. (We check the md5 for the whole section before doing anything on recovery.)
+ be applied, or nothing. (We check the md5 for the whole section before doing anything on
+ recovery.)
*/
struct JEntry {
enum OpCodes {
diff --git a/src/mongo/db/storage/mmap_v1/dur_journalimpl.h b/src/mongo/db/storage/mmap_v1/dur_journalimpl.h
index 06441653fe3..e51608b69e4 100644
--- a/src/mongo/db/storage/mmap_v1/dur_journalimpl.h
+++ b/src/mongo/db/storage/mmap_v1/dur_journalimpl.h
@@ -108,8 +108,8 @@ private:
static void preFlush();
static void postFlush();
unsigned long long _preFlushTime;
- unsigned long long
- _lastFlushTime; // data < this time is fsynced in the datafiles (unless hard drive controller is caching)
+ // data < this time is fsynced in the datafiles (unless hard drive controller is caching)
+ unsigned long long _lastFlushTime;
bool _writeToLSNNeeded;
void updateLSNFile();
};
diff --git a/src/mongo/db/storage/mmap_v1/dur_preplogbuffer.cpp b/src/mongo/db/storage/mmap_v1/dur_preplogbuffer.cpp
index 3caf910ab37..ea3b4e85148 100644
--- a/src/mongo/db/storage/mmap_v1/dur_preplogbuffer.cpp
+++ b/src/mongo/db/storage/mmap_v1/dur_preplogbuffer.cpp
@@ -69,7 +69,9 @@ static DurableMappedFile* findMMF_inlock(void* ptr, size_t& ofs) {
DurableMappedFile* f = privateViews.find_inlock(ptr, ofs);
if (f == 0) {
error() << "findMMF_inlock failed " << privateViews.numberOfViews_inlock() << endl;
- printStackTrace(); // we want a stack trace and the assert below didn't print a trace once in the real world - not sure why
+ // we want a stack trace and the assert below didn't print a trace once in the real world -
+ // not sure why
+ printStackTrace();
stringstream ss;
ss << "view pointer cannot be resolved " << std::hex << (size_t)ptr;
journalingFailure(ss.str().c_str()); // asserts, which then abends
diff --git a/src/mongo/db/storage/mmap_v1/dur_recover.cpp b/src/mongo/db/storage/mmap_v1/dur_recover.cpp
index 49daa8c6550..c37fbd23ef7 100644
--- a/src/mongo/db/storage/mmap_v1/dur_recover.cpp
+++ b/src/mongo/db/storage/mmap_v1/dur_recover.cpp
@@ -207,7 +207,8 @@ public:
_entries->skip(len + 1); // skip '\0' too
_entries->read(lenOrOpCode); // read this for the fall through
}
- // fall through as a basic operation always follows jdbcontext, and we don't have anything to return yet
+ // fall through as a basic operation always follows jdbcontext, and we don't have
+ // anything to return yet
default:
// fall through
@@ -520,7 +521,8 @@ bool RecoveryJob::processFile(boost::filesystem::path journalfile) {
return true;
}
} catch (...) {
- // if something weird like a permissions problem keep going so the massert down below can happen (presumably)
+ // if something weird like a permissions problem keep going so the massert down below can
+ // happen (presumably)
log() << "recover exception checking filesize" << endl;
}
diff --git a/src/mongo/db/storage/mmap_v1/dur_stats.h b/src/mongo/db/storage/mmap_v1/dur_stats.h
index 8ec6f8c024f..35cee01d0c6 100644
--- a/src/mongo/db/storage/mmap_v1/dur_stats.h
+++ b/src/mongo/db/storage/mmap_v1/dur_stats.h
@@ -33,8 +33,9 @@
namespace mongo {
namespace dur {
-/** journaling stats. the model here is that the commit thread is the only writer, and that reads are
- uncommon (from a serverStatus command and such). Thus, there should not be multicore chatter overhead.
+/** journaling stats. the model here is that the commit thread is the only writer, and that reads
+ * are uncommon (from a serverStatus command and such). Thus, there should not be multicore chatter
+ * overhead.
*/
struct Stats {
struct S {
diff --git a/src/mongo/db/storage/mmap_v1/durable_mapped_file.cpp b/src/mongo/db/storage/mmap_v1/durable_mapped_file.cpp
index d8757c90622..92cc7e84ef9 100644
--- a/src/mongo/db/storage/mmap_v1/durable_mapped_file.cpp
+++ b/src/mongo/db/storage/mmap_v1/durable_mapped_file.cpp
@@ -28,8 +28,10 @@
* it in the license file.
*/
-/* this module adds some of our layers atop memory mapped files - specifically our handling of private views & such
- if you don't care about journaling/durability (temp sort files & such) use MemoryMappedFile class, not this.
+/* this module adds some of our layers atop memory mapped files - specifically our handling of
+ * private views & such
+ if you don't care about journaling/durability (temp sort files & such) use MemoryMappedFile
+ class, not this.
*/
#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kStorage
@@ -275,9 +277,8 @@ bool DurableMappedFile::finishOpening() {
"(look in log for "
"more information)");
}
- privateViews.add_inlock(
- _view_private,
- this); // note that testIntent builds use this, even though it points to view_write then...
+ // note that testIntent builds use this, even though it points to view_write then...
+ privateViews.add_inlock(_view_private, this);
} else {
_view_private = _view_write;
}
diff --git a/src/mongo/db/storage/mmap_v1/durable_mapped_file.h b/src/mongo/db/storage/mmap_v1/durable_mapped_file.h
index a34fdef6fb2..230dbc31349 100644
--- a/src/mongo/db/storage/mmap_v1/durable_mapped_file.h
+++ b/src/mongo/db/storage/mmap_v1/durable_mapped_file.h
@@ -36,9 +36,9 @@
namespace mongo {
-/** DurableMappedFile adds some layers atop memory mapped files - specifically our handling of private views & such.
- if you don't care about journaling/durability (temp sort files & such) use MemoryMappedFile class,
- not this.
+/** DurableMappedFile adds some layers atop memory mapped files - specifically our handling of
+ * private views & such. if you don't care about journaling/durability (temp sort files & such) use
+ * MemoryMappedFile class, not this.
*/
class DurableMappedFile : private MemoryMappedFile {
protected:
@@ -275,6 +275,7 @@ inline void PointerToDurableMappedFile::makeWritable(void* privateView, unsigned
inline void PointerToDurableMappedFile::makeWritable(void* _p, unsigned len) {}
#endif
-// allows a pointer into any private view of a DurableMappedFile to be resolved to the DurableMappedFile object
+// allows a pointer into any private view of a DurableMappedFile to be resolved to the
+// DurableMappedFile object
extern PointerToDurableMappedFile privateViews;
}
diff --git a/src/mongo/db/storage/mmap_v1/durop.cpp b/src/mongo/db/storage/mmap_v1/durop.cpp
index d7d36bc36e3..754e486f1c2 100644
--- a/src/mongo/db/storage/mmap_v1/durop.cpp
+++ b/src/mongo/db/storage/mmap_v1/durop.cpp
@@ -136,9 +136,9 @@ bool FileCreatedOp::needFilesClosed() {
}
void FileCreatedOp::replay() {
- // i believe the code assumes new files are filled with zeros. thus we have to recreate the file,
- // or rewrite at least, even if it were the right length. perhaps one day we should change that
- // although easier to avoid defects if we assume it is zeros perhaps.
+ // i believe the code assumes new files are filled with zeros. thus we have to recreate the
+ // file, or rewrite at least, even if it were the right length. perhaps one day we should
+ // change that although easier to avoid defects if we assume it is zeros perhaps.
string full = _p.asFullPath();
if (boost::filesystem::exists(full)) {
try {
diff --git a/src/mongo/db/storage/mmap_v1/durop.h b/src/mongo/db/storage/mmap_v1/durop.h
index 337f8177970..b6d80538524 100644
--- a/src/mongo/db/storage/mmap_v1/durop.h
+++ b/src/mongo/db/storage/mmap_v1/durop.h
@@ -44,9 +44,9 @@ namespace dur {
/** DurOp - Operations we journal that aren't just basic writes.
*
- * Basic writes are logged as JEntry's, and indicated in ram temporarily as struct dur::WriteIntent.
- * We don't make WriteIntent inherit from DurOp to keep it as lean as possible as there will be millions of
- * them (we don't want a vtable for example there).
+ * Basic writes are logged as JEntry's, and indicated in ram temporarily as struct
+ * dur::WriteIntent. We don't make WriteIntent inherit from DurOp to keep it as lean as possible as
+ * there will be millions of them (we don't want a vtable for example there).
*
* For each op we want to journal, we define a subclass.
*/
diff --git a/src/mongo/db/storage/mmap_v1/extent.h b/src/mongo/db/storage/mmap_v1/extent.h
index 9d6d3935346..16af89fb42b 100644
--- a/src/mongo/db/storage/mmap_v1/extent.h
+++ b/src/mongo/db/storage/mmap_v1/extent.h
@@ -42,7 +42,8 @@ namespace mongo {
/* extents are datafile regions where all the records within the region
belong to the same namespace.
-(11:12:35 AM) dm10gen: when the extent is allocated, all its empty space is stuck into one big DeletedRecord
+(11:12:35 AM) dm10gen: when the extent is allocated, all its empty space is stuck into one big
+ DeletedRecord
(11:12:55 AM) dm10gen: and that is placed on the free list
*/
#pragma pack(1)
diff --git a/src/mongo/db/storage/mmap_v1/journal_latency_test_cmd.cpp b/src/mongo/db/storage/mmap_v1/journal_latency_test_cmd.cpp
index c34cf60df5f..2b1cb3dfb15 100644
--- a/src/mongo/db/storage/mmap_v1/journal_latency_test_cmd.cpp
+++ b/src/mongo/db/storage/mmap_v1/journal_latency_test_cmd.cpp
@@ -122,7 +122,8 @@ public:
sleepmillis(4);
}
long long y = t2.micros() - 4 * N * 1000;
- // not really trusting the timer granularity on all platforms so whichever is higher of x and y
+ // not really trusting the timer granularity on all platforms so whichever is higher
+ // of x and y
bb[pass].append("8KBWithPauses", max(x, y) / (N * 1000.0));
}
{
diff --git a/src/mongo/db/storage/mmap_v1/mmap_v1_extent_manager.cpp b/src/mongo/db/storage/mmap_v1/mmap_v1_extent_manager.cpp
index aaa28e1f1fc..41cf7b70a91 100644
--- a/src/mongo/db/storage/mmap_v1/mmap_v1_extent_manager.cpp
+++ b/src/mongo/db/storage/mmap_v1/mmap_v1_extent_manager.cpp
@@ -443,8 +443,8 @@ DiskLoc MmapV1ExtentManager::_allocFromFreeList(OperationContext* txn,
break;
}
if (t.seconds() >= 2) {
- // have spent lots of time in write lock, and we are in [low,high], so close enough
- // could come into play if extent freelist is very long
+ // have spent lots of time in write lock, and we are in [low,high], so close
+ // enough could come into play if extent freelist is very long
break;
}
} else {
diff --git a/src/mongo/db/storage/mmap_v1/record.h b/src/mongo/db/storage/mmap_v1/record.h
index 131b1144ff6..de3ffaef2cb 100644
--- a/src/mongo/db/storage/mmap_v1/record.h
+++ b/src/mongo/db/storage/mmap_v1/record.h
@@ -42,13 +42,16 @@ class DeletedRecord;
/* Record is a record in a datafile. DeletedRecord is similar but for deleted space.
*11:03:20 AM) dm10gen: regarding extentOfs...
-(11:03:42 AM) dm10gen: an extent is a continugous disk area, which contains many Records and DeleteRecords
+(11:03:42 AM) dm10gen: an extent is a continugous disk area, which contains many Records and
+ DeleteRecords
(11:03:56 AM) dm10gen: a DiskLoc has two pieces, the fileno and ofs. (64 bit total)
-(11:04:16 AM) dm10gen: to keep the headesr small, instead of storing a 64 bit ptr to the full extent address, we keep just the offset
+(11:04:16 AM) dm10gen: to keep the headesr small, instead of storing a 64 bit ptr to the full
+ extent address, we keep just the offset
(11:04:29 AM) dm10gen: we can do this as we know the record's address, and it has the same fileNo
(11:04:33 AM) dm10gen: see class DiskLoc for more info
(11:04:43 AM) dm10gen: so that is how Record::myExtent() works
-(11:04:53 AM) dm10gen: on an alloc(), when we build a new Record, we must populate its extentOfs then
+(11:04:53 AM) dm10gen: on an alloc(), when we build a new Record, we must populate its extentOfs
+ then
*/
#pragma pack(1)
class Record {
diff --git a/src/mongo/db/storage/mmap_v1/record_store_v1_base.cpp b/src/mongo/db/storage/mmap_v1/record_store_v1_base.cpp
index 9b1817707c9..a0b9e770ead 100644
--- a/src/mongo/db/storage/mmap_v1/record_store_v1_base.cpp
+++ b/src/mongo/db/storage/mmap_v1/record_store_v1_base.cpp
@@ -791,7 +791,8 @@ Status RecordStoreV1Base::validate(OperationContext* txn,
if (loc.questionable()) {
if (isCapped() && !loc.isValid() && i == 1) {
- /* the constructor for NamespaceDetails intentionally sets deletedList[1] to invalid
+ /* the constructor for NamespaceDetails intentionally sets
+ * deletedList[1] to invalid
see comments in namespace.h
*/
break;