[SERVER-46791] Fix incorrect FCV initialisation check to allow compound hashed index Created: 11/Mar/20 Updated: 29/Oct/23 Resolved: 12/Mar/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | 4.3.4 |
| Fix Version/s: | 4.4.0-rc0, 4.7.0 |
| Type: | Bug | Priority: | Minor - P4 |
| Reporter: | Arun Banala | Assignee: | Arun Banala |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | qexec-team | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Backwards Compatibility: | Fully Compatible | ||||
| Operating System: | ALL | ||||
| Backport Requested: |
v4.4
|
||||
| Sprint: | Query 2020-03-23 | ||||
| Participants: | |||||
| Description |
|
The current implementation allows creating compound hashed index if featureCompatibility.isVersionInitialized() evaluates to false. This might cause issues if FeatureCompatibilityVersion object ever gets uninitialized.
|
| Comments |
| Comment by Githook User [ 12/Mar/20 ] |
|
Author: {'username': 'banarun', 'name': 'Arun Banala', 'email': 'arun.banala@mongodb.com'}Message: (cherry picked from commit a9a2bc2fcc4c7b5cd9a01282cd7dded84b888183) |
| Comment by Githook User [ 12/Mar/20 ] |
|
Author: {'username': 'banarun', 'name': 'Arun Banala', 'email': 'arun.banala@mongodb.com'}Message: |
| Comment by Bernard Gorman [ 11/Mar/20 ] |
|
I don't believe this code will ever actually be exercised while the FCV is unset, but out of an abundance of caution we should eliminate the logical bug here. |
| Comment by Daniel Gottlieb (Inactive) [ 11/Mar/20 ] |
|
FWIW, featureCompatibility.getVersion() will invariant if FCV is not initialized; omitting the call to isVersionInitialized entirely is often preferable. If this code can legitimately be exercised when FCV is unset (typically only very early at startup), it might be worth documenting. |