summaryrefslogtreecommitdiff
path: root/src/mongo/db/commands/dbcheck.cpp
diff options
context:
space:
mode:
authorIan Kuehne <ian.kuehne@mongodb.com>2017-08-09 13:34:27 -0400
committerIan Kuehne <ian.kuehne@mongodb.com>2017-08-22 16:51:12 -0400
commit3ac3be976459d6499bda024fd17388877947d368 (patch)
tree026e210f786549a22a707a8d9aa717a288832543 /src/mongo/db/commands/dbcheck.cpp
parentd33d4c43a019e17e3afb8be5fa47382f7566e26c (diff)
downloadmongo-3ac3be976459d6499bda024fd17388877947d368.tar.gz
SERVER-30646 Fix dbCheck health log entries.
Diffstat (limited to 'src/mongo/db/commands/dbcheck.cpp')
-rw-r--r--src/mongo/db/commands/dbcheck.cpp25
1 files changed, 13 insertions, 12 deletions
diff --git a/src/mongo/db/commands/dbcheck.cpp b/src/mongo/db/commands/dbcheck.cpp
index b23ebd76472..1c3fdcf8b39 100644
--- a/src/mongo/db/commands/dbcheck.cpp
+++ b/src/mongo/db/commands/dbcheck.cpp
@@ -186,7 +186,7 @@ private:
stats.nBytes,
stats.md5,
stats.md5,
- info.start,
+ start,
stats.lastKey,
stats.time);
HealthLog::get(Client::getCurrent()->getServiceContext()).log(*entry);
@@ -238,8 +238,9 @@ private:
auto prev = UUIDCatalog::get(opCtx).prev(_dbName, *collection->uuid());
auto next = UUIDCatalog::get(opCtx).next(_dbName, *collection->uuid());
- // Find and report the indices.
+ // Find and report collection metadata.
auto indices = collectionIndexInfo(opCtx, collection);
+ auto options = collectionOptions(opCtx, collection);
DbCheckOplogCollection entry;
entry.setNss(collection->ns());
@@ -252,6 +253,7 @@ private:
}
entry.setType(OplogEntriesEnum::Collection);
entry.setIndexes(indices);
+ entry.setOptions(options);
repl::OpTime optime =
writeConflictRetry(opCtx, "log dbCheck to oplog", collection->ns().ns(), [&] {
@@ -269,16 +271,15 @@ private:
return optime;
});
- auto hle = dbCheckCollectionEntry(collection->ns(),
- collection->ns().coll().toString(),
- *collection->uuid(),
- entry.getPrev(),
- entry.getPrev(),
- entry.getNext(),
- entry.getNext(),
- entry.getIndexes(),
- entry.getIndexes(),
- optime);
+ DbCheckCollectionInformation collectionInfo;
+ collectionInfo.collectionName = collection->ns().coll().toString();
+ collectionInfo.prev = entry.getPrev();
+ collectionInfo.next = entry.getNext();
+ collectionInfo.indexes = entry.getIndexes();
+ collectionInfo.options = entry.getOptions();
+
+ auto hle = dbCheckCollectionEntry(
+ collection->ns(), *collection->uuid(), collectionInfo, collectionInfo, optime);
HealthLog::get(opCtx).log(*hle);