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

ThreadClient should restore original thread name on destruction

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 5.3.0
    • None
    • None
    • Fully Compatible
    • Service Arch 2022-1-10
    • 3

    Description

      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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: