Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-70005

SetIndexVersion in CollectionType should not be able to change collection uuid

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.0.0-rc0
    • 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.

      1. 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).
      2. Remove setIndexVersion altogether
      3. (Optional and later): Get rid of getEpoch / getTimestamp and replace them with getIdentity.

            Assignee:
            allison.easton@mongodb.com Allison Easton
            Reporter:
            allison.easton@mongodb.com Allison Easton
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: