diff options
Diffstat (limited to 'src/mongo/db/catalog/validate_state.h')
| -rw-r--r-- | src/mongo/db/catalog/validate_state.h | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/src/mongo/db/catalog/validate_state.h b/src/mongo/db/catalog/validate_state.h index df796c686ce..8144ddb5cc3 100644 --- a/src/mongo/db/catalog/validate_state.h +++ b/src/mongo/db/catalog/validate_state.h @@ -55,15 +55,11 @@ class ValidateState { ValidateState& operator=(const ValidateState&) = delete; public: - /** - * 'turnOnExtraLoggingForTest' turns on extra logging for test debugging. This parameter is for - * unit testing only. - */ ValidateState(OperationContext* opCtx, const NamespaceString& nss, ValidateMode mode, RepairMode repairMode, - bool turnOnExtraLoggingForTest = false); + bool logDiagnostics); const NamespaceString& nss() const { return _nss; @@ -123,6 +119,10 @@ public: return _indexes; } + const StringSet& getSkippedIndexes() const { + return _skippedIndexes; + } + /** * Map of index names to index cursors. */ @@ -162,11 +162,9 @@ public: /** * Indicates whether extra logging should occur during validation. - * - * This is for unit testing only. Intended to improve diagnosibility. */ - bool extraLoggingForTest() { - return _extraLoggingForTest; + bool logDiagnostics() { + return _logDiagnostics; } boost::optional<Timestamp> getValidateTimestamp() { @@ -235,6 +233,10 @@ private: std::unique_ptr<SeekableRecordThrottleCursor> _traverseRecordStoreCursor; std::unique_ptr<SeekableRecordThrottleCursor> _seekRecordStoreCursor; + // Stores the set of indexes that will not be validated for some reason, e.g. they are not + // ready. + StringSet _skippedIndexes; + RecordId _firstRecordId; DataThrottle _dataThrottle; @@ -242,8 +244,8 @@ private: // Used to detect when the catalog is re-opened while yielding locks. uint64_t _catalogGeneration; - // Can be set by unit tests to obtain better insight into what validate sees/does. - bool _extraLoggingForTest; + // Can be set to obtain better insight into what validate sees/does. + bool _logDiagnostics; boost::optional<Timestamp> _validateTs = boost::none; }; |
