@@ -121,7 +121,7 @@ namespace {
121
121
const CountScanStats* spec = static_cast <const CountScanStats*>(specific);
122
122
return spec->keysExamined ;
123
123
}
124
- else if (STAGE_DISTINCT == type) {
124
+ else if (STAGE_DISTINCT_SCAN == type) {
125
125
const DistinctScanStats* spec = static_cast <const DistinctScanStats*>(specific);
126
126
return spec->keysExamined ;
127
127
}
@@ -173,7 +173,7 @@ namespace {
173
173
const CountScanStats* spec = static_cast <const CountScanStats*>(specific);
174
174
ss << " " << spec->keyPattern ;
175
175
}
176
- else if (STAGE_DISTINCT == stage->stageType ()) {
176
+ else if (STAGE_DISTINCT_SCAN == stage->stageType ()) {
177
177
const DistinctScanStats* spec = static_cast <const DistinctScanStats*>(specific);
178
178
ss << " " << spec->keyPattern ;
179
179
}
@@ -291,6 +291,7 @@ namespace mongo {
291
291
bob->append (" keyPattern" , spec->keyPattern );
292
292
bob->append (" indexName" , spec->indexName );
293
293
bob->appendBool (" isMultiKey" , spec->isMultiKey );
294
+ bob->append (" indexVersion" , spec->indexVersion );
294
295
}
295
296
else if (STAGE_DELETE == stats.stageType ) {
296
297
DeleteStats* spec = static_cast <DeleteStats*>(stats.specific .get ());
@@ -345,6 +346,7 @@ namespace mongo {
345
346
bob->append (" keyPattern" , spec->keyPattern );
346
347
bob->append (" indexName" , spec->indexName );
347
348
bob->appendBool (" isMultiKey" , spec->isMultiKey );
349
+ bob->append (" indexVersion" , spec->indexVersion );
348
350
bob->append (" direction" , spec->direction > 0 ? " forward" : " backward" );
349
351
350
352
if ((topLevelBob->len () + spec->indexBounds .objsize ()) > kMaxStatsBSONSize ) {
0 commit comments