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

Rename Collection might take the unsharded path while sharding a collection

    • Fully Compatible
    • ALL
    • Hide

      0. Create an unsharded collection
      1. Run a rename collection which chooses the unsharded rename path
      2. A shard collection runs and successfully shards the collection
      3. The rename fails because the source collection

      Show
      0. Create an unsharded collection 1. Run a rename collection which chooses the unsharded rename path 2. A shard collection runs and successfully shards the collection 3. The rename fails because the source collection

      The new rename collection is checking if the source collection is sharded without any lock before choosing which path to take. This leaves the following scenario to happen:

      0. Create an unsharded collection
      1. Run a rename collection which chooses the unsharded rename path
      2. A shard collection runs and successfully shards the collection
      3. The rename fails because the source collection must not be sharded

      We could move the unsharded path to inside the coordinator, so the choice can be taken after serializing with other DDL operations.

            Assignee:
            pierlauro.sciarelli@mongodb.com Pierlauro Sciarelli
            Reporter:
            marcos.grillo@mongodb.com Marcos José Grillo Ramirez
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: