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

ThreadClient should restore original thread name on destruction

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 5.3.0
    • Affects Version/s: None
    • Component/s: None
    • Fully Compatible
    • Service Arch 2022-1-10
    • 3

      ThreadClient is an RAII type that manages a client's lifecycle by instantiating a client on the current thread on construction (through Client::initThread()) and resetting the thread's client on destruction. Instantiating a client will set the thread's name, but ThreadClient does not restore the original thread name, if any, on destruction. This means when ThreadClients are used by threads in a pool, like worked scheduled by a transaction two phase commit coordinator, those threads will have their original names permanently overwritten, leading to misleading log messages when they're later used.

            Assignee:
            daniel.morilha@mongodb.com Daniel Morilha (Inactive)
            Reporter:
            jack.mulrow@mongodb.com Jack Mulrow
            Votes:
            2 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: