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

Avoid special-case handling in ServiceEntryPointImpl::shutdown

    XMLWordPrintable

    Details

    • Operating System:
      ALL
    • Story Points:
      2

      Description

      Shutting down the service entry point outside TSAN and ASAN builds immediately returns true without running any shutdown code. A separate interface, shutdownAndWait, is introduced to shutdown the service entry point.

      bool ServiceEntryPointImpl::shutdown(Milliseconds timeout) {
      #if __has_feature(address_sanitizer) || __has_feature(thread_sanitizer)
          // When running under address sanitizer, we get false positive leaks due to disorder around
          // the lifecycle of a connection and request. When we are running under ASAN, we try a lot
          // harder to dry up the server from active connections before going on to really shut down.
          return shutdownAndWait(timeout);
      #else
          return true;
      #endif
      }
      

      We should remove the special-case handling in shutdown and have it run the body of shutdownAndWait. This would also obviate the need for shutdownAndWait.

      Acceptance criteria: Change the code to have #if is at the higher level of the stack. Make sure we link these to the relevant shutdown project. 

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              backlog-server-servicearch Backlog - Service Architecture
              Reporter:
              amirsaman.memaripour Amirsaman Memaripour
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated: