diff options
author | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2014-06-26 11:26:46 -0400 |
---|---|---|
committer | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2014-06-27 18:19:50 -0400 |
commit | b9a211782b7ca536ccb6c23b2017434317ca3da3 (patch) | |
tree | ce6b4dcf0b1158fe4af5a755c36d5f61f028ca7b /src/mongo/tools | |
parent | 3de470bbddb4cd228161f90a7034dc1deb8b12fd (diff) | |
download | mongo-b9a211782b7ca536ccb6c23b2017434317ca3da3.tar.gz |
SERVER-13961 Move clean shutdown logic from dbexit to exitCleanly only
All remaining places, which call dbexit, outside of repl are in response
to unhandled exceptions, so it is not safe to call commit.
The repl calls happen at secondary replica startup time, so no writes
would have happened, so there should not be any data to throw out outside
of replication bookkeeping data.
Diffstat (limited to 'src/mongo/tools')
-rw-r--r-- | src/mongo/tools/tool.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mongo/tools/tool.cpp b/src/mongo/tools/tool.cpp index 50a94a263f6..96c9ac0c841 100644 --- a/src/mongo/tools/tool.cpp +++ b/src/mongo/tools/tool.cpp @@ -188,8 +188,9 @@ namespace mongo { if ( currentClient.get() ) currentClient.get()->shutdown(); - if (toolGlobalParams.useDirectClient) - dbexit( EXIT_CLEAN ); + if (toolGlobalParams.useDirectClient) { + exitCleanly(EXIT_CLEAN); + } fflush(stdout); fflush(stderr); |