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

Non-default-seeded hashed indexes not working correctly since 2.6

    • Type: Icon: Bug Bug
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Storage Execution
    • ALL

      We introduced hashed indexes in 2.4, where we could take an option seed to compute the hash and it worked accordingly. Since 2.6, we computed the hashes for the keystrings using the non-default seed as expected, but when running the query we incorrectly used the default hash key. (The code hasn’t been really changed and here’s the link to them on master: insertquery) Starting from 3.4, we disallowed users to pass the seed option. This option would never be touched throughout upgrades. After 5.0, it will be automatically skipped when calling listIndexes. The validate command can detect this disallowed field on disk, and users can use collMod to remove it from the catalog. Also, it doesn't seem to have any documentation of the seed field, not even on 2.4 where we introduced it.

      Since we haven't really got any complaints from our users, I'm not sure if we would want to implement any fix at all to make the non-default seeded indexes to work correctly. On the other hand, we may want to consider removing the code handling the non-default seed on master.

            Assignee:
            backlog-server-execution [DO NOT USE] Backlog - Storage Execution Team
            Reporter:
            yuhong.zhang@mongodb.com Yuhong Zhang
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: