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

Unique indexes created between 4.2 and 6.0 may be upgraded to the new format version

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Storage Execution

      We should provide a way to check whether all the entries in a unique index are in the correct format. If they are, update the data format version to the new one introduced in SERVER-63577.

      There are a couple ways we could do this:
      1. Overload the "unique: true" option to collMod. If we call "unique: true" on an index that is already unique, we will attempt to upgrade the data format version if all the entries are in the correct format. This may be confusing semantically since unique: true is associated with the two-phase collMod approach
      2. Introduce a new option to collMod that would do the same thing.

      Either way, it is not our responsibility to re-write entries that are in the wrong format. We will just have to scan the entries and fail if we find any in the old format. This indicates to the user that they may need to rebuild their indexes.

            Assignee:
            backlog-server-execution [DO NOT USE] Backlog - Storage Execution Team
            Reporter:
            pavithra.vetriselvan@mongodb.com Pavithra Vetriselvan
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: