Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-31650

Change streams do not correctly record diagnostics during initial aggregate command

    XMLWordPrintableJSON

Details

    • Query Execution
    • ALL

    Description

      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.

      Attachments

        Activity

          People

            backlog-query-execution Backlog - Query Execution
            charlie.swanson@mongodb.com Charlie Swanson
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated: