split with find doesn't work if chunk has only 1 document

XMLWordPrintableJSON

    • ALL
    • Sharding 2019-12-30, Sharding 2020-01-13, Sharding 2020-01-27
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      db.adminCommand({ enableSharding: 'test' });
      db.adminCommand({ shardCollection: 'test.user', key: { x: 1 }});
      db.adminCommand({ split: 'test.user', middle: { x: 0 }})
      db.adminCommand({ split: 'test.user', middle: { x: 100 }})
      db.user.insert({ x: 1 })
      db.adminCommand({ split: 'test.user', find: { x: 1 }})
      

      returns:

      { "cause" : { }, "ok" : 0, "errmsg" : "split failed" }
      

      Note: if the collection was not presplit, the split command will run fine because of special case handling on chunks with MinKey or MaxKey as boundaries.

            Assignee:
            Marcos José Grillo Ramirez
            Reporter:
            Randolph Tan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: