-
Type: Bug
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: 7.0.0-rc2
-
Component/s: None
-
None
-
Storage Execution
-
ALL
When converting from using the legacy collStats command to the $collStats aggregation stage, end-to-end tests have identified that calling the aggregation stage consistently increases docUnitsRead in v7.0 builds of the server. We can reproduce the issue with the following script:
const node = MongoRunner.runMongod({ setParameter: { aggregateOperationResourceConsumptionMetrics: true } }); const admin = node.getDB("admin"); const db = node.getDB("foo"); // add some data to the collection assert.commandWorked(db.bar.insert({})); // run test const first = admin.aggregate([{ $operationMetrics: {} }]).next(); db.bar.aggregate([{ "$collStats": { "storageStats": {} } }]); const second = admin.aggregate([{ $operationMetrics: {} }]).next(); assert.eq(first.db, second.db); assert.eq(first.primaryMetrics.docUnitsRead, second.primaryMetrics.docUnitsRead); MongoRunner.stopMongod(node);
- is related to
-
SERVER-76391 Remove isReadyInMySnapshot() and isPresentInMySnapshot()
- Closed