Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-5387

moveChunk find:{$minKey:1} matches incorrect chunk

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Done
    • Affects Version/s: 2.0.3
    • Fix Version/s: None
    • Component/s: Sharding, Shell
    • Labels:
    • Operating System:
      ALL

      Description

      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?

        Attachments

          Activity

            People

            Assignee:
            backlog-server-sharding Backlog - Sharding Team
            Reporter:
            wayne530 Y. Wayne Huang
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: