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

Verify behavior of pre-3.4 index key specs on 3.4+ versions

    • Type: Icon: Task Task
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Storage Execution
    • Execution Team 2024-11-25

      Background
      The server only applies stricter index key pattern validation to v:2 indexes (as of SERVER-26659). This means that the server does not apply stricter validation on pre-3.4 legacy indexes. Pre-3.4 index key values could be 0, empty string, numbers other than -1 and 1, non-numeric / string values, etc. See SERVER-11064 for more information. 3.4+ server versions still handle pre-3.4 legacy indexes because these legacy indexes can persist across server upgrades.

      Solution
      We should confirm how pre-3.4 index key values behave on 3.4+ server versions. This includes (but is not limited to):

      • 0
      • empty string
      • non-numeric / non string values
      • really small ints / floats

      Any index key value that was accepted in pre-3.4 but not in 3.4+ should be investigated. We should also document this (internally or publicly).

      Impact on Mongosync / Mongomirror / Mongorestore
      Mongosyc and Mongomirror automatically convert source legacy index specs when building them on the destination. Mongorestore also does this if --convertLegacyIndexes option is enabled. Verifying pre-3.4 index behavior will ensure that mongosync/mongomirror/mongorestore converts them in the right way. For example, mongosync/mongomirror/mongorestore must convert a legacy index key value of 0 to 1 instead -1. Otherwise, the destination cluster will treat the index differently compared to the source cluster, which is a correctness issue for mongosync/mongomirror/mongorestore.

            Assignee:
            damian.wasilewicz@mongodb.com Damian Wasilewicz
            Reporter:
            ajay.vijayakumar@mongodb.com Ajay Vijayakumar
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: