summaryrefslogtreecommitdiff
path: root/src/mongo/shell/servers.js
diff options
context:
space:
mode:
authorTess Avitabile <tess.avitabile@mongodb.com>2018-03-15 16:16:58 -0400
committerTess Avitabile <tess.avitabile@mongodb.com>2018-03-20 10:25:27 -0400
commit374f14d984da357c943098735e7e6d13f250675a (patch)
tree91662f7eb9a6d9582dff0a7e312fffbc9a85398f /src/mongo/shell/servers.js
parent15400ae3c7ec6830e0f80b3dd84fd89632b73648 (diff)
downloadmongo-374f14d984da357c943098735e7e6d13f250675a.tar.gz
SERVER-33669 Stepdown and shutdown should abort all uncommitted transactions
Diffstat (limited to 'src/mongo/shell/servers.js')
-rw-r--r--src/mongo/shell/servers.js12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/mongo/shell/servers.js b/src/mongo/shell/servers.js
index ebe96ab57bd..4c868a34e0a 100644
--- a/src/mongo/shell/servers.js
+++ b/src/mongo/shell/servers.js
@@ -889,7 +889,9 @@ var MongoRunner, _startMongod, startMongoProgram, runMongoProgram, startMongoPro
* auth: {
* user {string}: admin user name
* pwd {string}: admin password
- * }
+ * },
+ * skipValidation: <bool>,
+ * allowedExitCode: <int>
* }
*
* Note: The auth option is required in a authenticated mongod running in Windows since
@@ -928,7 +930,13 @@ var MongoRunner, _startMongod, startMongoProgram, runMongoProgram, startMongoPro
// Invoke callback to validate collections and indexes before shutting down mongod.
// We skip calling the callback function when the expected return code of
// the mongod process is non-zero since it's likely the process has already exited.
- if (allowedExitCode === MongoRunner.EXIT_CLEAN) {
+
+ var skipValidation = false;
+ if (opts.skipValidation) {
+ skipValidation = true;
+ }
+
+ if (allowedExitCode === MongoRunner.EXIT_CLEAN && !skipValidation) {
MongoRunner.validateCollectionsCallback(port);
}