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

SplitVector fails to find the mid-point of a chunk

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Duplicate
    • 2.2.4, 2.4.3
    • None
    • Sharding
    • None
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: