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

Improve the perf of getOrGenerateSampleId() in the common case

    • Type: Icon: Task Task
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Cluster Scalability
    • Sharding NYC 2023-09-04, Sharding NYC 2023-09-18, Sharding NYC 2023-10-02, Sharding NYC 2023-10-16, Sharding NYC 2023-10-30, Cluster Scalability 2023-11-13
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      Based on my limited understanding, it seems that getOrGenerateSampleId() in the common case returns boost::none.

      Unfortunately, supportsPersistingSampledQueries() is slower than it ideally should be for the common case.

      getOrGenerateSampleId() showed up on some of the flamegraphs on PERF-4259. Here is a screenshot:

      The goal of this task is to make getOrGenerateSampleId() faster in the common case where getOrGenerateSampleId() returns boost::none.

        1. getOrGenerateSampleId.png
          535 kB
          Drew Paroski

            Assignee:
            cheahuychou.mao@mongodb.com Cheahuychou Mao
            Reporter:
            andrew.paroski@mongodb.com Drew Paroski
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: