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

SplitVector fails to find the mid-point of a chunk

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 2.2.4, 2.4.3
    • Component/s: Sharding
    • None
    • ALL

      SplitVector fails to find the mid-point of a chunk if it is forced and there are more than 250000 records in the chunk.

      To test this run the following from the mongo shell:

      > use test
      switched to db test
      > for (i=0; i < 500000; i++) {db.col.insert(

      {"i":i}

      );}
      > db.col.ensureIndex(

      {"i":1}

      )

      > db.adminCommand({"splitVector": "test.col", "keyPattern":

      {i:1}

      , "min":

      {i:0}

      , "max":

      {i: 250001}

      , force: true})

      it will output something like this:

      {"timeMillis" : 81, "splitKeys": [

      {"i": 250000}

      ], "ok": 1}

      so the split point it suggests is the record just before the last one, which is pretty far from the middle.

            Assignee:
            Unassigned Unassigned
            Reporter:
            dawei David Weibull
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: