Investigate changes in SERVER-127109: Duplicate incrementation of server status metrics for multiplanner during fallback scenario

XMLWordPrintableJSON

    • Type: Investigation
    • Resolution: Won't Do
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Tools and Replicator

      Original Downstream Change Summary

      This patch fixes the values emitted by several serverStatus() metrics, connected to the AutomaticCE planning strategy.
      It does not introduce new metrics.

      Description of Linked Ticket

      For the CBR for no MP results fallback mode, in the case that the initial MP trials find some docs (but not enough to EOF or fill a batch), we resume multiplanning by calling runTrials() a second time. This means that in the initial trials we increment the metrics once, and when we resume we increment them a second time, breaking timing information up into two parts and causing duplicate counting of MP invocations.

      The metrics affected by this are:

      • query.multiPlanner.histograms.classicMicros

      • query.multiPlanner.histograms.classicWorks
      • query.multiPlanner.histograms.classicNumPlans
      • query.multiPlanner.classicCount

      server_status_automaticCE.js should also be updated to test this behavior, as it currently uses a query which hits EOF to resume MP rather than finding just a few documents.

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

              Created:
              Updated:
              Resolved: