summaryrefslogtreecommitdiff
path: root/src/mongo
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>2022-08-19 20:03:56 +0000
commit712a3e7a91c460adaa31e3583f02094caceb809a (patch)
tree17376351104de830444e0563b3b6a14ec15175be /src/mongo
parent26750a4eec848d9a019fd595cf58b0b6ddfa4b9a (diff)
downloadmongo-712a3e7a91c460adaa31e3583f02094caceb809a.tar.gz
SERVER-66012 Use the WiredTiger version cursor to print the index entries metadata when corruption is detected during validation
Diffstat (limited to 'src/mongo')
-rw-r--r--src/mongo/db/catalog/index_consistency.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/mongo/db/catalog/index_consistency.cpp b/src/mongo/db/catalog/index_consistency.cpp
index 3b64708a6d7..94caaf8ee48 100644
--- a/src/mongo/db/catalog/index_consistency.cpp
+++ b/src/mongo/db/catalog/index_consistency.cpp
@@ -352,8 +352,10 @@ 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->asSortedData()->getSortedDataInterface()->printIndexEntryMetadata(
+ opCtx, ks);
}
}
@@ -432,9 +434,12 @@ void IndexConsistency::addIndexKey(OperationContext* opCtx,
}
_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->asSortedData()
+ ->getSortedDataInterface()
+ ->printIndexEntryMetadata(opCtx, ks);
return;
}
search->second.insert(info);