1
0
Fork 0

Bugfix for sync. repl.

This commit is contained in:
Max Neunhoeffer 2016-05-31 01:18:05 -06:00
parent ab7ab515fb
commit 1538bb7cb0
1 changed files with 3 additions and 5 deletions

View File

@ -856,11 +856,9 @@ function cleanupCurrentCollections (plannedCollections, currentCollections,
for (shard in shards) {
if (shards.hasOwnProperty(shard)) {
if (shards[shard].servers[0] === ourselves &&
(! shardMap.hasOwnProperty(shard) ||
shardMap[shard].indexOf(ourselves) !== 0)) {
// found an entry in current of a shard that we used to be
// leader for but that we are no longer leader for
if (! shardMap.hasOwnProperty(shard)) {
// found an entry in current of a shard that is no longer
// mentioned in the plan
console.info("cleaning up entry for shard '%s' of '%s/%s",
shard,
database,