Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-14895

[SERVER] Investigate changes in SERVER-57037: Improve precision of operator counters

    XMLWordPrintable

Details

    • Task
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 5.2.0, 5.0.6, 5.1.2, 4.4.13, 4.4.14
    • Server
    • None

    Description

      Downstream Change Summary

      Operator counters for aggregate expressions were introduced previously. This patch improves the precision of the counters - there is no duplicate counting due to internal query processing or multiple documents. That may require small adjustments in the documentation text and examples.

      Description of Linked Ticket

      SERVER-56422 introduced operator counters for aggregate expressions using the moment of parsing of an expression to increment its counter. Since in some cases expressions are parsed multiple times during query processing, the counter value overestimates the true expression occurrence.

      The goal of this task is to implement an alternative idea with more precise counter increment using the CurOp class. The idea of Charlie is to 

      • Add counter map to the CurOp object.
      • Add APIs to CurOp to #1 increment counters and #2 transition to "parsing stats collection is over - do not track", which we can call to lock them into place once we're done the first complete parsing. e.g. in runAggregate() or FindCmd::run().
      • Once in this state any requests to increment the counters won't do anything so the code will still look pretty simple from within parseExpression().
      • Finally transition the stats from the CurOp object into the serverStatus counters during 'completeAndLogOperation'.

      Attachments

        Issue Links

          Activity

            People

              dave.cuthbert@mongodb.com Dave Cuthbert
              backlog-server-pm Backlog - Core Eng Program Management Team
              Jess Mokrzecki Jess Mokrzecki
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                11 weeks, 3 days ago