CollecitonImpl::_genericRecordStoreValidate and RecordStoreValidateAdaptor::validate are nearly identical.
Here's a diff:
< void RecordStoreValidateAdaptor::traverseRecordStore(RecordStore* recordStore,
< ValidateCmdLevel level,
< ValidateResults* results,
< BSONObjBuilder* output) {
---
> void _genericRecordStoreValidate(OperationContext* opCtx,
> RecordStore* recordStore,
> RecordStoreValidateAdaptor* indexValidator,
> ValidateResults* results,
> BSONObjBuilder* output) {
10c11
< std::unique_ptr<SeekableRecordCursor> cursor = recordStore->getCursor(_opCtx, true);
---
> std::unique_ptr<SeekableRecordCursor> cursor = recordStore->getCursor(opCtx, true);
15,16d15
< ++nrecords;
<
18c17
< _opCtx->checkForInterrupt();
---
> opCtx->checkForInterrupt();
20c19
<
---
> ++nrecords;
24c23
< Status status = validate(record->id, record->data, &validatedSize);
---
> Status status = indexValidator->validate(record->id, record->data, &validatedSize);
26c25
< // Checks to ensure isInRecordIdOrder() is being used properly.
---
> // Check to ensure isInRecordIdOrder() is being used properly.
30a30,31
> // ValidatedSize = dataSize is not a general requirement as some storage engines may use
> // padding, but we still require that they return the unpadded record data.
41,42d41
< // While some storage engines may use padding, we still require that they return the
< // unpadded record data.
56c55
< recordStore->updateStatsAfterRepair(_opCtx, nrecords, dataSizeTotal);
---
> recordStore->updateStatsAfterRepair(opCtx, nrecords, dataSizeTotal);
- is depended on by
-
SERVER-42357 Periodically release locks during collection validation and check for interrupts
-
- Closed
-