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

mergeChunk error message wrong when chunk on wrong shard

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 2.5.4
    • Affects Version/s: 2.5.2
    • Component/s: Sharding
    • Labels:
    • Fully Compatible
    • ALL
    • Hide

      sh.splitAt("foo.bad",{_id:0})

      { "ok" : 1 }

      foo@local(2.5.2) > sh.moveChunk("foo.bad",{_id:-1},"shard0001")

      { "millis" : 32, "ok" : 1 }

      foo@local(2.5.2) > sh._adminCommand({mergeChunks:"foo.bad", bounds:[{_id:MinKey},{_id:MaxKey}]})
      {
      "ok" : 0,
      "errmsg" : "could not merge chunks, collection foo.bad does not contain a chunk starting at ...
      }

      Sometimes it says "ending at" - depending on where it started.

      Show
      sh.splitAt("foo.bad",{_id:0}) { "ok" : 1 } foo@local(2.5.2) > sh.moveChunk("foo.bad",{_id:-1},"shard0001") { "millis" : 32, "ok" : 1 } foo@local(2.5.2) > sh._adminCommand({mergeChunks:"foo.bad", bounds: [{_id:MinKey},{_id:MaxKey}] }) { "ok" : 0, "errmsg" : "could not merge chunks, collection foo.bad does not contain a chunk starting at ... } Sometimes it says "ending at" - depending on where it started.

      Split a chunk. Move one of new (empty) chunks to another shard. Try to (re)merge those two chunks.

      Error message: "errmsg" : "could not merge chunks, collection foo.bar does not contain a chunk ending at

      { _id: 40.0 }

      "

      Error message should say that collection does not contain chunk ending at <key> on this shard or "the chunks you want to merge are on different shards".

            Assignee:
            randolph@mongodb.com Randolph Tan
            Reporter:
            asya.kamsky@mongodb.com Asya Kamsky
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: