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

make renameCollection attach databaseVersion and shardVersion=UNSHARDED

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.7.4
    • Affects Version/s: 3.5.10
    • Component/s: Sharding
    • None
    • Fully Compatible
    • ALL
    • Sharding 2017-08-21, Sharding 2017-09-11, Sharding 2017-10-02, Sharding 2017-10-23, Sharding 2018-03-26

      renameCollection is not supposed to be allowed to run on sharded collections.

      However, today shardCollection and renameCollection can run concurrently, and therefore race.

      So, we can end up in a situation where the UUID in a config.collections entry (propagated from the primary shard through shardCollection) differs from the UUID on the primary shard (after renameCollection).

      In this case, it is as if the collection has been dropped and recreated as unsharded, but the entry for the old sharded collection doesn't get deleted from config.collections.

            Assignee:
            kaloian.manassiev@mongodb.com Kaloian Manassiev
            Reporter:
            esha.maharishi@mongodb.com Esha Maharishi (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: