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

NetworkInterface::startCommand should be able to reject requests due to shutdown

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Critical - P2 Critical - P2
    • 3.3.5
    • Affects Version/s: None
    • Component/s: Networking
    • Labels:
      None
    • Fully Compatible
    • Platforms 12 (04/01/16)
    • 0

      In order to allow the ThreadPoolTaskExecutor to issue NetworkInterface::startCommand outside the executor's mutex, it is necessary that startCommand return some indication as to whether or not the network interface takes ownership of the operation.

      Proposed behavior:

      NetworkInterface::startCommand returns false if NetworkInterface::shutdown has already started, and true otherwise. If it returns true, then the onFinish argument will be executed by NetworkInterface eventually; otherwise, it will not. setAlarm should behave similarly

      NetworkInterface::shutdown blocks until callbacks assocated with all accepted commands and alarms have executed. It is OK (preferred?) for shutdown() to cause some or all pending callbacks to execute with a "CallbackCanceled" status in order to expedite shutdown.

            Assignee:
            waley.chen Waley Chen
            Reporter:
            schwerin@mongodb.com Andy Schwerin
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: