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

Wrong key count for reverse indexes in WT

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • 3.1.5
    • None
    • Storage, WiredTiger
    • None
    • Fully Compatible
    • ALL

    Description

      Steps to reproduce:
      1. create a collection and a reverse index
      2. insert two records into a collection
      3. db.collection.validate(

      {full:true}

      ) will report that the index has 0 keys in "keysPerIndex" field, while the expected number would be 2

      I suspect the problem is here: https://github.com/mongodb/mongo/blob/v3.0/src/mongo/db/storage/wiredtiger/wiredtiger_index.cpp#L288

      We're locating minKey, although minKey is actually at the end for the reverse index.

      The same problem exists for RocksDB because I copied that part of the code

      Attachments

        Activity

          People

            david.hows David Hows
            igor Igor Canadi
            Votes:
            1 Vote for this issue
            Watchers:
            10 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: