Storage Engine API
mongo::RecordStoreValidateAdaptor Class Reference

The record store validate adaptor is used to keep track of the index consistency during a validation that's running. More...

#include <record_store_validate_adaptor.h>

Inheritance diagram for mongo::RecordStoreValidateAdaptor:
mongo::ValidateAdaptor

Detailed Description

The record store validate adaptor is used to keep track of the index consistency during a validation that's running.

Public Member Functions

 RecordStoreValidateAdaptor (OperationContext *opCtx, IndexConsistency *indexConsistency, ValidateCmdLevel level, IndexCatalog *ic, ValidateResultsMap *irm)
 
virtual Status validate (const RecordId &recordId, const RecordData &record, size_t *dataSize)
 Validates the BSON object and traverses through its key set to keep track of the index consistency. More...
 
void traverseIndex (const IndexAccessMethod *iam, const IndexDescriptor *descriptor, ValidateResults *results, int64_t *numTraversedKeys)
 Traverses the index getting index entriess to validate them and keep track of the index keys for index consistency. More...
 
void traverseRecordStore (RecordStore *recordStore, ValidateCmdLevel level, ValidateResults *results, BSONObjBuilder *output)
 Traverses the record store to retrieve every record and go through its document key set to keep track of the index consistency during a validation. More...
 
void validateIndexKeyCount (IndexDescriptor *idx, int64_t numRecs, ValidateResults &results)
 Validate that the number of document keys matches the number of index keys. More...
 
- Public Member Functions inherited from mongo::ValidateAdaptor
virtual ~ValidateAdaptor ()
 

Private Attributes

OperationContext * _opCtx
 
IndexConsistency_indexConsistency
 
ValidateCmdLevel _level
 
IndexCatalog_indexCatalog
 
ValidateResultsMap * _indexNsResultsMap
 

Constructor & Destructor Documentation

◆ RecordStoreValidateAdaptor()

mongo::RecordStoreValidateAdaptor::RecordStoreValidateAdaptor ( OperationContext *  opCtx,
IndexConsistency indexConsistency,
ValidateCmdLevel  level,
IndexCatalog ic,
ValidateResultsMap *  irm 
)
inline

Member Function Documentation

◆ traverseIndex()

void mongo::RecordStoreValidateAdaptor::traverseIndex ( const IndexAccessMethod *  iam,
const IndexDescriptor *  descriptor,
ValidateResults results,
int64_t *  numTraversedKeys 
)

Traverses the index getting index entriess to validate them and keep track of the index keys for index consistency.

◆ traverseRecordStore()

void mongo::RecordStoreValidateAdaptor::traverseRecordStore ( RecordStore recordStore,
ValidateCmdLevel  level,
ValidateResults results,
BSONObjBuilder *  output 
)

Traverses the record store to retrieve every record and go through its document key set to keep track of the index consistency during a validation.

◆ validate()

Status mongo::RecordStoreValidateAdaptor::validate ( const RecordId &  recordId,
const RecordData record,
size_t *  dataSize 
)
virtual

Validates the BSON object and traverses through its key set to keep track of the index consistency.

Implements mongo::ValidateAdaptor.

◆ validateIndexKeyCount()

void mongo::RecordStoreValidateAdaptor::validateIndexKeyCount ( IndexDescriptor *  idx,
int64_t  numRecs,
ValidateResults results 
)

Validate that the number of document keys matches the number of index keys.

Member Data Documentation

◆ _indexCatalog

IndexCatalog* mongo::RecordStoreValidateAdaptor::_indexCatalog
private

◆ _indexConsistency

IndexConsistency* mongo::RecordStoreValidateAdaptor::_indexConsistency
private

◆ _indexNsResultsMap

ValidateResultsMap* mongo::RecordStoreValidateAdaptor::_indexNsResultsMap
private

◆ _level

ValidateCmdLevel mongo::RecordStoreValidateAdaptor::_level
private

◆ _opCtx

OperationContext* mongo::RecordStoreValidateAdaptor::_opCtx
private

The documentation for this class was generated from the following files: