diff options
author | Aaron <aaron@10gen.com> | 2009-04-28 13:56:58 -0400 |
---|---|---|
committer | Aaron <aaron@10gen.com> | 2009-04-28 13:56:58 -0400 |
commit | e19818604f5b57ff6413531747e12c5ef09f25bf (patch) | |
tree | e247bb95404e6f02c8ce937cfa14d88f44be8eae /shell/servers.js | |
parent | 02a7e7c9b80872691aced8cd3513662541853087 (diff) | |
download | mongo-e19818604f5b57ff6413531747e12c5ef09f25bf.tar.gz |
precise slave state check
Diffstat (limited to 'shell/servers.js')
-rw-r--r-- | shell/servers.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/shell/servers.js b/shell/servers.js index c3ee9d286be..7530854c1f4 100644 --- a/shell/servers.js +++ b/shell/servers.js @@ -249,12 +249,12 @@ ReplPair.prototype.checkSteadyState = function( leftValues, rightValues ) { rightValues[ rm ] = true; } - if ( rm == 1 ) { + if ( rm == 1 && ( lm == null || lm == 0 ) ) { assert( !( 1 in leftValues ) ); this.master_ = this.rightC_; this.slave_ = this.leftC_; return true; - } else if ( lm == 1 ) { + } else if ( lm == 1 && ( rm == null || rm == 0 ) ) { assert( !( 1 in rightValues ) ); this.master_ = this.leftC_; this.slave_ = this.rightC_; |