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

Rename Collection might take the unsharded path while sharding a collection

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.9.0
    • Component/s: Sharding
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Steps To Reproduce:
      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

      Description

      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.

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved: