summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuhong Zhang <yuhong.zhang@mongodb.com>2022-08-18 15:06:56 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2023-03-16 20:51:23 +0000
commit6aa7e94ac7a0dcb67bb7142ab0cbea3cf7d885a7 (patch)
treec5fd89bd1e17b59b9249682e9e983b3213e3573e
parentd7357bc8cd3a08f8e22397ba721ea3a5b4b34511 (diff)
downloadmongo-6aa7e94ac7a0dcb67bb7142ab0cbea3cf7d885a7.tar.gz
SERVER-66012 Use the WiredTiger version cursor to print the index entries metadata when corruption is detected during validation
(cherry picked from commit 712a3e7a91c460adaa31e3583f02094caceb809a) (cherry picked from commit 8db6f57ad3faf22644337811d07f6869369e7656)
-rw-r--r--src/mongo/db/catalog/index_consistency.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mongo/db/catalog/index_consistency.cpp b/src/mongo/db/catalog/index_consistency.cpp
index 095d637bc3d..dd38352a5e1 100644
--- a/src/mongo/db/catalog/index_consistency.cpp
+++ b/src/mongo/db/catalog/index_consistency.cpp
@@ -425,8 +425,9 @@ void IndexConsistency::addDocKey(OperationContext* opCtx,
_missingIndexEntries.insert(
std::make_pair(key, IndexEntryInfo(*indexInfo, recordId, idKeyBuilder.obj(), ks)));
- // Prints the collection document's metadata.
+ // Prints the collection document's and index entry's metadata.
_validateState->getCollection()->getRecordStore()->printRecordMetadata(opCtx, recordId);
+ indexInfo->accessMethod->getSortedDataInterface()->printIndexEntryMetadata(opCtx, ks);
}
}
@@ -499,9 +500,11 @@ void IndexConsistency::addIndexKey(OperationContext* opCtx,
SimpleBSONObjSet infoSet = {info};
_extraIndexEntries.insert(std::make_pair(key, infoSet));
- // Prints the collection document's metadata.
+ // Prints the collection document's and index entry's metadata.
_validateState->getCollection()->getRecordStore()->printRecordMetadata(opCtx,
recordId);
+ indexInfo->accessMethod->getSortedDataInterface()->printIndexEntryMetadata(opCtx,
+ ks);
return;
}
search->second.insert(info);