[SERVER-63980] Unique indexes created between 4.2 and 6.0 may be upgraded to the new format version Created: 24/Feb/22  Updated: 06/Dec/22

Status: Backlog
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Pavithra Vetriselvan Assignee: Backlog - Storage Execution Team
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Storage Execution
Participants:

 Description   

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.


Generated at Thu Feb 08 05:59:10 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.