-
Type: Improvement
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Fully Compatible
-
Service Arch 2022-03-07
-
2
ServiceEntryPointImpl::shutdownAndWait is currently held behind a compilation flag and is only called when the code is instrumented with either thread or address sanitizers. A lot of code has been written taking this ill formed behavior into consideration which now makes it trickier to get it fixed - by removing the compilation flag few dozen of tests start failing. Also, the team isn't confident about the overall impact it would have on a production environment.
While consulting with other peers from the Service Arch team, a good approach towards solving it is running ServiceEntryPointImpl::shutdownAndWait conditioned to a server parameter. This way, builds can be triggered as needed and BFs opened accordingly.
The overarching goal is to eventually turn the flag on by default.
bool ServiceEntryPointImpl::shutdown(Milliseconds timeout) { + bool shouldShutdownAndWait = feature_flags::gFeatureFlagShutdownAndWait.isEnabledAndIgnoreFCV(); + #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; + shouldShutdownAndWait = true; #endif + + if (shouldShutdownAndWait) + return shutdownAndWait(timeout); + else + return true; }
- is depended on by
-
SERVER-63768 Create a manually triggered evergreen build variant for server parameter joinIngressSessionsOnShutdown
- Closed
- related to
-
SERVER-57427 Avoid special-case handling in ServiceEntryPointImpl::shutdown
- Closed
-
SERVER-52110 Create feature flag for Global clean shutdown
- Closed
-
SERVER-52413 Enable feature flag for Global clean shutdown
- Closed