diff options
author | Andy Schwerin <schwerin@mongodb.com> | 2017-01-15 15:43:06 -0500 |
---|---|---|
committer | Andy Schwerin <schwerin@mongodb.com> | 2017-01-15 15:44:49 -0500 |
commit | a7e74d56036e94c3e4ed11ceeb4cd43e95209aa5 (patch) | |
tree | e90d6b26cb5f1bb26ebf95a36aa93ddf60f8c45c /src/mongo/util/ntservice.cpp | |
parent | be58d599fd9df085c94be3c22051f04aa3df5c13 (diff) | |
download | mongo-a7e74d56036e94c3e4ed11ceeb4cd43e95209aa5.tar.gz |
SERVER-27603 Rename mongo::inShutdown() to mongo::globalInShutdownDeprecated() for clarity.
Calling this function is deprecated because modules that consult it
cannot engage in an orderly, coordinated shutdown. Instead, such
modules tend to just stop working at some point after
mongo::shutdown() is invoked, without regard to whether modules that
depend on them have already shut down.
As such, for clarity, this patch renames the function from
mongo::inShutdown() to mongo::globalInShutdownDeprecated(). This also
helps disambiguate calls to this function from calls to individual
components' similarly named functions.
Also, remove uncalled mongo::inShutdownStrict().
Diffstat (limited to 'src/mongo/util/ntservice.cpp')
-rw-r--r-- | src/mongo/util/ntservice.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mongo/util/ntservice.cpp b/src/mongo/util/ntservice.cpp index 8044d26790d..362644e4ff8 100644 --- a/src/mongo/util/ntservice.cpp +++ b/src/mongo/util/ntservice.cpp @@ -575,12 +575,13 @@ static void serviceShutdown(const char* controlCodeName) { setThreadName("serviceShutdown"); log() << "got " << controlCodeName << " request from Windows Service Control Manager, " - << (inShutdown() ? "already in shutdown" : "will terminate after current cmd ends"); + << (globalInShutdownDeprecated() ? "already in shutdown" + : "will terminate after current cmd ends"); reportStatus(SERVICE_STOP_PENDING, kStopWaitHintMillis); // Note: This triggers _serviceCallback, ie ServiceMain, - // to stop by setting inShutdown() == true + // to stop by setting globalInShutdownDeprecated() == true shutdownNoTerminate(); // Note: we will report exit status in initService |