Avoid string copy when updating API version metrics

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: Major - P3
    • 8.0.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Cluster Scalability
    • Fully Compatible
    • Cluster Scalability 2024-4-1
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      Every request on mongos and mongod that has client metadata will update the API version metrics tracking stats. The stats are stored in a map of maps of std::strings to a Date_t. Looking up from this map requires the client's application name as a std::string, which requires converting a StringData into a std::string (e.g. on mongos). We should be able to skip this by using a StringMap which stores std::string keys but can be looked up in by StringData.

            Assignee:
            Jack Mulrow
            Reporter:
            Jack Mulrow
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: