-
Type: Bug
-
Resolution: Unresolved
-
Priority: Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: Aggregation Framework, Diagnostics
-
Query Execution
-
ALL
When processing a change stream aggregation, the server will acquire locks on the oplog to do its scan. Unfortunately, acquiring locks is also the process we use to record diagnostics like Top and currentOp (see db_raii.h). This means that the initial aggregate will be treated as if it was an aggregate on the 'local.oplog.rs' collection, using the profiling level of the 'local' database, recording a read entry in the 'local.oplog.rs' section of the top output, and using that namespace in the currentOp output and in the slow query logs.
We do register the change stream cursor on the user's requested namespace, so all getMore commands will behave correctly when tracking these metrics.