diff options
author | Gregory Wlodarek <gregory.wlodarek@mongodb.com> | 2022-02-01 21:09:49 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-02-01 23:18:54 +0000 |
commit | a18228593a8e86f037e102a5e5f61dae68c1583e (patch) | |
tree | 44b6938b7515af53a187ece55fd33d0d7b303246 | |
parent | 5d4891f796acae59b5126cdee56c99814a0b13b8 (diff) | |
download | mongo-a18228593a8e86f037e102a5e5f61dae68c1583e.tar.gz |
SERVER-61203 Use the WiredTiger version cursor to print the collection records metadata when corruption is detected during validation
-rw-r--r-- | src/mongo/db/catalog/index_consistency.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mongo/db/catalog/index_consistency.cpp b/src/mongo/db/catalog/index_consistency.cpp index c5c0a2d1ce7..141a54cf00b 100644 --- a/src/mongo/db/catalog/index_consistency.cpp +++ b/src/mongo/db/catalog/index_consistency.cpp @@ -348,6 +348,9 @@ void IndexConsistency::addDocKey(OperationContext* opCtx, invariant(_missingIndexEntries.count(key) == 0); _missingIndexEntries.insert( std::make_pair(key, IndexEntryInfo(*indexInfo, recordId, idKeyBuilder.obj(), ks))); + + // Prints the collection document's metadata. + _validateState->getCollection()->getRecordStore()->printRecordMetadata(opCtx, recordId); } } @@ -419,6 +422,10 @@ void IndexConsistency::addIndexKey(OperationContext* opCtx, if (search == _extraIndexEntries.end()) { SimpleBSONObjSet infoSet = {info}; _extraIndexEntries.insert(std::make_pair(key, infoSet)); + + // Prints the collection document's metadata. + _validateState->getCollection()->getRecordStore()->printRecordMetadata(opCtx, + recordId); return; } search->second.insert(info); |