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

with multiple equal, but not bit equivalent, values for a key, only one is stored in the index

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • None
    • None
    • Index Maintenance
    • None
    • Query
    • Fully Compatible
    • ALL

    Description

      Can cause problems when covered indexes are used, and likely in other scenarios.

      > c.drop()
      true
      > c.save( {a:[0.0,NumberLong(0)]} )
      > c.find( {a:0}, {a:1,_id:0} )
      { "a" : [ 0, NumberLong(0) ] }
      > c.ensureIndex( {a:1} )
      > c.find( {a:0}, {a:1,_id:0} )
      { "a" : 0 }

      Probably doesn't make sense to allow multiple equal keys per doc in the short term, since without extra work that would break uniqueness of key,doc pairs which would would be bad for the btrees and likely other places. But we can try prevent bad results as in above.

      Attachments

        Activity

          People

            backlog-server-query Backlog - Query Team (Inactive)
            aaron Aaron Staple
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: