[SERVER-31438] Remove featureCompatibilityVersion parameter for IndexDescriptor::getDefaultIndexVersion Created: 06/Oct/17  Updated: 06/Dec/22  Resolved: 20/Oct/17

Status: Closed
Project: Core Server
Component/s: Index Maintenance
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Louis Williams Assignee: Backlog - Query Team (Inactive)
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-31608 FeatureCompatibility Version enum is ... Closed
Assigned Teams:
Query
Participants:

 Description   

The function IndexDescriptor::getDefaultIndexVersion accepts a featureCompatibilityVersion parameter, but does nothing with it. In an attempt to reduce direct accesses to the fCV version parameter in SERVER-30745, this function should remove the argument and return the default.

IndexVersion IndexDescriptor::getDefaultIndexVersion(
    ServerGlobalParams::FeatureCompatibility::Version featureCompatibilityVersion) {
    return IndexVersion::kV2;
}

As a result, the calls to serverGlobalParams.featureCompatibility.getVersion() in database_impl.cpp, index_key_validate.cpp, and drop_indexes.cpp should be removed.



 Comments   
Comment by Ian Whalen (Inactive) [ 20/Oct/17 ]

Agreed that it makes sense to do SERVER-31608, we want to keep this parameter around to make it easy to bump the index version in a future release.

Comment by Tess Avitabile (Inactive) [ 18/Oct/17 ]

This featureCompatibilityVersion parameter was intentionally left in place when we bumped the FCV to 3.6, since we thought it likely that in a future release, the default index version will depend on the FCV, as it did in 3.4. However, I agree that we will need to remove the use of getVersion().

Generated at Thu Feb 08 04:27:04 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.