ISSUE SUMMARY
The update system sets nscanned and nscannedObjects simply by incrementing counters. This is at odds with the query system's definition of nscanned as "the number of keys examined" and nscannedObjects as "the number of documents examined".
These values are collected and made available through the profiler and slow query log.
USER IMPACT
The profiler and the slow query log may show incorrect values for nscanned and nscannedObjects for update operations. These values should be larger than reported.
WORKAROUNDS
N/A
AFFECTED VERSIONS
MongoDB 2.6 production releases up to 2.6.3 are affected by this issue.
FIX VERSION
The fix is included in the 2.6.4 production release.
RESOLUTION DETAILS
Retrieve the correct values for nscanned and nscannedObjects from underlying query runner.