diff options
Diffstat (limited to 'src/mongo/shell/replsettest.js')
-rw-r--r-- | src/mongo/shell/replsettest.js | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/src/mongo/shell/replsettest.js b/src/mongo/shell/replsettest.js index 5634ba016a8..de35e14d9dd 100644 --- a/src/mongo/shell/replsettest.js +++ b/src/mongo/shell/replsettest.js @@ -914,16 +914,12 @@ var ReplSetTest = function(opts) { options.binVersion = MongoRunner.versionIterator(options.binVersion); } - // If restarting a node, use its existing options as the defaults. - options.restart = options.restart || restart; - if (options.restart) { - options = Object.merge(this.nodes[n].fullOptions, options); - } else { - options = Object.merge(defaults, options); - } + options = Object.merge(defaults, options); options = Object.merge(options, this.nodeOptions["n" + n]); delete options.rsConfig; + options.restart = options.restart || restart; + var pathOpts = {node: n, set: this.name}; options.pathOpts = Object.merge(options.pathOpts || {}, pathOpts); @@ -987,16 +983,13 @@ var ReplSetTest = function(opts) { }; /** - * Restarts a db without clearing the data directory by default, and using the node(s)'s - * original startup options by default. + * Restarts a db without clearing the data directory by default. If the server is not + * stopped first, this function will not work. * * Option { startClean : true } forces clearing the data directory. * Option { auth : Object } object that contains the auth details for admin credentials. * Should contain the fields 'user' and 'pwd' * - * In order not to use the original startup options, use stop() (or stopSet()) followed by - * start() (or startSet()) without passing restart: true as part of the options. - * * @param {int|conn|[int|conn]} n array or single server number (0, 1, 2, ...) or conn */ this.restart = function(n, options, signal, wait) { |