diff options
author | Gregory Wlodarek <gregory.wlodarek@mongodb.com> | 2019-08-22 20:33:15 -0400 |
---|---|---|
committer | Gregory Wlodarek <gregory.wlodarek@mongodb.com> | 2019-08-22 20:49:59 -0400 |
commit | 46522393008ad96af478aa1dd5122ea6e4960889 (patch) | |
tree | e137e422d989c0fadda1fb5fa19c939d9237b521 /src/mongo/db/catalog/index_consistency.cpp | |
parent | 98ae88a36c731e79ed1a299b954c0dfafd7b096c (diff) | |
download | mongo-46522393008ad96af478aa1dd5122ea6e4960889.tar.gz |
SERVER-42226 Use the maxValidateMBperSec server parameter to throttle collection validation operations
Diffstat (limited to 'src/mongo/db/catalog/index_consistency.cpp')
-rw-r--r-- | src/mongo/db/catalog/index_consistency.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/mongo/db/catalog/index_consistency.cpp b/src/mongo/db/catalog/index_consistency.cpp index 4a21ccc736e..4a470f4e5fe 100644 --- a/src/mongo/db/catalog/index_consistency.cpp +++ b/src/mongo/db/catalog/index_consistency.cpp @@ -188,11 +188,13 @@ void IndexConsistency::addIndexEntryErrors(ValidateResultsMap* indexNsResultsMap results->valid = false; } -void IndexConsistency::addDocKey(const KeyString::Builder& ks, - IndexInfo* indexInfo, - RecordId recordId, - const std::unique_ptr<SeekableRecordCursor>& seekRecordStoreCursor, - const BSONObj& indexKey) { +void IndexConsistency::addDocKey( + OperationContext* opCtx, + const KeyString::Builder& ks, + IndexInfo* indexInfo, + RecordId recordId, + const std::unique_ptr<SeekableRecordThrottleCursor>& seekRecordStoreCursor, + const BSONObj& indexKey) { const uint32_t hash = _hashKeyString(ks, indexInfo->indexNameHash); if (_firstPhase) { @@ -204,7 +206,7 @@ void IndexConsistency::addDocKey(const KeyString::Builder& ks, // Found a document key for a hash bucket that had mismatches. // Get the documents _id index key. - auto record = seekRecordStoreCursor->seekExact(recordId); + auto record = seekRecordStoreCursor->seekExact(opCtx, recordId); invariant(record); BSONObj data = record->data.toBson(); |