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

Avoid recreating a NamespaceString object from ns string in logging

    • Type: Icon: Task Task
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • Serverless
    • Server Serverless 2023-05-29
    • 1

      Today, in the logWriteConflictAndBackoff, it recreates a NamespaceString object from the input parameter "StringData ns". It's not reasonable for some reasons:

      1. the "ns" is already a string for logging. Recreating a NamespaceString object from it is wasting the cpu/memory.
      2. the call patch of it can pass in not only a ns string but also a UUID string (eg, here). It's not reasonable to create a NamespaceString object from a UUID string. 
      3. the 'NamespaceString(ns)' function will be removed by SERVER-65920.

      In this ticket, we'll log the ns directly, for example,

       "namespace"_attr = ns
      

            Assignee:
            sophia.tan@mongodb.com Sophia Tan
            Reporter:
            sophia.tan@mongodb.com Sophia Tan
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: