we have a sharded collection "x", with chunks:
{ "shard_id" : { $minKey : 1 } } -->> { "shard_id" : "0" } on : shard1 { "t" : 5000, "i" : 1 } { "shard_id" : "0" } -->> { "shard_id" : "d" } on : shard2 { "t" : 8000, "i" : 0 } { "shard_id" : "d" } -->> { "shard_id" : "k" } on : shard3 { "t" : 8000, "i" : 1 } { "shard_id" : "k" } -->> { "shard_id" : "z" } on : shard3 { "t" : 2000, "i" : 0 } { "shard_id" : "z" } -->> { "shard_id" : { $maxKey : 1 } } on : shard4 { "t" : 7000, "i" : 0 }
from mongos:
mongos> use admin; mongos> db.runCommand({"moveChunk":"mydb.x","find":{"email":{"$minKey":1}},"to":"shard4"}); { "ok" : 0, "errmsg" : "that chunk is already on that shard" } mongos> db.runCommand({"moveChunk":"mydb.x","find":{"email":{"$lt":"0"}},"to":"shard4"}); { "ok" : 0, "errmsg" : "that chunk is already on that shard" }
is it incorrectly "finding" the last chunk?