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

maxChunksize error when using 'find' instead of 'middle' with the 'split' command.

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: 2.0.4
    • Component/s: Sharding
    • None
    • Environment:
    • OS X

      Issue is while trying to pre-split a chunk on a sharded collection using the 'find', 'to' split options. Using the 'middle' option works as shown below:

      MongoDB shell version: 2.0.6
      connecting to: test
      mongos> db.createCollection('test');

      { "ok" : 1 }

      mongos> use admin
      switched to db admin
      mongos> db.runCommand(

      {enablesharding: 'test'}

      );

      { "ok" : 1 }

      mongos> db.runCommand({'shardcollection': 'test.test', key: {'key1': 1, 'key2': 1}});

      { "collectionsharded" : "test.test", "ok" : 1 }

      mongos> db.runCommand({split: 'test.test', find:

      { 'key1': 1, 'key2': 1 }

      , to: { 'key1': 6, 'key2': 6 }});
      {
      "assertion" : "splitVector command (median key) failed:

      { errmsg: \"need to specify the desired max chunk size (maxChunkSize or maxChunkSizeBytes)\", ok: 0.0 }

      ",
      "assertionCode" : 13503,
      "errmsg" : "db assertion failure",
      "ok" : 0
      }
      mongos> db.runCommand({split: 'test.test', find:

      { 'key1': 1, 'key2': 1 }

      , to:

      { 'key1': 5, 'key2': 5 }

      , maxChunkSize: 16});
      {
      "assertion" : "splitVector command (median key) failed:

      { errmsg: \"need to specify the desired max chunk size (maxChunkSize or maxChunkSizeBytes)\", ok: 0.0 }

      ",
      "assertionCode" : 13503,
      "errmsg" : "db assertion failure",
      "ok" : 0
      }
      mongos> db.runCommand({split: 'test.test', middle: { 'key1': 3, 'key2': 3 }});

      { "ok" : 1 }

      I've also tried increasing and decreasing the chunk size from the config db with no changes to the above error message.

            Assignee:
            greg_10gen Greg Studer
            Reporter:
            noid q
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: