-
Type: Bug
-
Resolution: Done
-
Priority: Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: Diagnostics, Querying
-
None
-
ALL
-
-
Query 2017-01-23
In different circumstances count will record a different number of commands. Usually it records two, except after the collection is dropped.
I believe this is because the Client::Context::~Context destructor in client.cpp gets called twice:
dbcommands.cpp 2001 execCommand Client::ReadContext
dbcommands.cpp 1341 CollectionStats.run Client::Context
This causes CurOp::recordGlobalTime to be called twice, which then calls Top::record twice.
Also, the reason that count is only recorded once after a dropped collection because of an explicit check for this in Top::record.
- is depended on by
-
SERVER-7774 Add jstest for db.adminCommand('top')
- Closed
- is related to
-
SERVER-7774 Add jstest for db.adminCommand('top')
- Closed