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

Wrong key count for reverse indexes in WT

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.1.5
    • Affects Version/s: None
    • Component/s: Storage, WiredTiger
    • Labels:
      None
    • Fully Compatible
    • ALL

      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

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

              Created:
              Updated:
              Resolved: