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

SplitVector fails to find the mid-point of a chunk

    XMLWordPrintable

    Details

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

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved: