Investigate changes in SERVER-123987: Add opcounters.aggregate counter

XMLWordPrintableJSON

    • Type: Investigation
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • Developer Tools

      Original Downstream Change Summary

      Introduces a new opcounters.aggregates metric that tracks top-level aggregate command invocations as their own exclusive counter, replacing the previous behavior where aggregate incremented opcounters.queries. The two counters are now fully mutually exclusive: an aggregate call increments only aggregates, and a find call increments only queries. Neither increments opcounters.commands.

      Description of Linked Ticket

      Overview

      Introduce a new opcounters.aggregate metric to track top-level aggregate commands separately from the general command counter.

      Scope of Work

      • src/mongo/db/stats/opcounters.h/.cpp — Add gotAggregate() method and aggregate counter field
      • Shard role service entry point and mongos strategy — Call gotAggregate() when processing aggregate commands

      Technical Notes

      • appears in OTel output, and also in serverStatus.opcounters

            Assignee:
            Unassigned
            Reporter:
            Backlog - Core Eng Program Management Team
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: