-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
Sharding EMEA
-
Fully Compatible
-
Sharding EMEA 2023-02-06, Sharding EMEA 2023-02-20
This ticket is being created out of a comment in the PR of SERVER-69622 to address the unsafe setIndexVersion functions in the CollectionType. The comment is pasted below:
I think such ability to set the timestamp/epoch/index version separately from the collection identity is a little bit dangerous, because there is nothing to guarantee that someone doesn't put a different collection identity with one or the other.
- Get rid of setEpoch/setTimestamp and substitute them with one method called setCollectionVersions (or something similar), which I guess currently will take just the identity and the CollectionIndexes, but in the future we can add whatever other components we decide to add. If it is possible to make this be the constructor (without a setter, even better).
- Remove setIndexVersion altogether
- (Optional and later): Get rid of getEpoch / getTimestamp and replace them with getIdentity.