[SERVER-26230] Aggregation plan summary incorrectly reports keysExamined and docsExamined Created: 21/Sep/16  Updated: 19/Nov/16  Resolved: 30/Sep/16

Status: Closed
Project: Core Server
Component/s: Aggregation Framework, Diagnostics
Affects Version/s: 3.3.12
Fix Version/s: 3.4.0-rc0

Type: Bug Priority: Major - P3
Reporter: Charlie Swanson Assignee: Tess Avitabile (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Query 2016-10-10
Participants:

 Description   

On each batch we load through DocumentSourceCursor, we will accidentally bump the keysExamined and docsExamined instead of resetting them to zero and then re-computing them.

More specifically, Explain::getSummaryStats() is called (indirectly) during DocumentSourceCursor::loadBatch(). That will increment the totalKeysExamined and totalDocsExamined for each stage, but these were never reset to 0, so it will double count the first batch.



 Comments   
Comment by Githook User [ 30/Sep/16 ]

Author:

{u'username': u'tessavitabile', u'name': u'Tess Avitabile', u'email': u'tess.avitabile@mongodb.com'}

Message: SERVER-26230 DocumentSourceCursor should reset keysExamined and docsExamined between batches
Branch: master
https://github.com/mongodb/mongo/commit/cbea5409faa7c1bc717aa9000fa6c904c27a1a90

Generated at Thu Feb 08 04:11:30 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.