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

duplicate _ids possible when values exceed max index key size

    Details

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

      Description

      Observed behavior: _id values larger than the max key size are not indexed and so duplicates are not prevented
      Expected behavior: _id value larger than max key size is not allowed

      Test

      > c.drop()
      true
      > var big = new Array( 10000 ).toString()
      > c.save( { _id:big } )
      > c.save( { _id:big } )
      > c.count()
      2
      > c.find( { _id:big, dummy:null } ).hint( { $natural:1 } ).itcount()
      2

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: