[SERVER-71068] Partial indexes should not check FCV during startup Created: 03/Nov/22 Updated: 29/Oct/23 Resolved: 19/Jan/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | 6.0.0, 6.1.0-rc4, 6.2.0-rc0 |
| Fix Version/s: | 6.0.5 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | David Percy | Assignee: | Matt Boros |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||||||||||
| Operating System: | ALL | ||||||||||||||||||||||||||||
| Sprint: | QO 2023-01-23 | ||||||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||||||
| Case: | (copied to CRM) | ||||||||||||||||||||||||||||
| Description |
|
The problem: When we check whether an index spec is valid, we inspect the parsed partialFilterExpression and check whether each operator is allowed under the current FCV. For example $or is allowed in a partial filter expression in 6.0 but not 5.x. However, when you downgrade FCV from 6.0 to 5.x, we are not checking whether existing partial indexes are allowed under 5.x. You end up with new features in the datafiles, but an old FCV. Then during startup, we do check FCV and reject the index, so the server fails to start. Another reason we shouldn't check FCV during startup is that determining FCV in the first place requires loading the catalog for the admin database. So if you create any partial index on the admin database (regardless of 6.0 features), then we check FCV before FCV is initialized, which fails (regardless of the value of FCV: 5.x or 6.0). The solution:
Workarounds (requested here in HELP-42790): For future HELP tickets that run into this issue and are on a version earlier than 6.0.5, the only known workaround is to drop the partial indexes on the admin database. They can then be replaced with non-partial indexes and the FCV issue should be resolved. |
| Comments |
| Comment by Githook User [ 17/Jan/23 ] |
|
Author: {'name': 'Matt Boros', 'email': 'matt.boros@mongodb.com', 'username': 'mattBoros'}Message: |