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

create more state in NiTL ctor

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.2.4, 4.3.3
    • Affects Version/s: None
    • Component/s: Networking
    • None
    • Fully Compatible
    • ALL
    • v4.2
    • Service Arch 2019-12-30, Service Arch 2020-01-13, Service Arch 2020-01-27

      Calls to NetworkInterfaceTL::startCommand() before NetworkInterfaceTL::startup() wil cause crashes (due to an assumption inside NetworkInterfaceTL::startCommand() that we have a connection pool.

      That's out of contract for a NetworkInterface

          /**
           * Starts up the network interface.
           *
           * It is valid to call all methods except shutdown() before this method completes.  That is,
           * implementations may not assume that startup() completes before startCommand() first
           * executes.
           *
           * Called by the owning TaskExecutor inside its run() method.
           */
          virtual void startup() = 0;
      

      To fix that, lets create more state on the NiTL in it's ctor, and only spin up the background thread in startup().

            Assignee:
            mira.carey@mongodb.com Mira Carey
            Reporter:
            mira.carey@mongodb.com Mira Carey
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: