Rename Collection might take the unsharded path while sharding a collection

XMLWordPrintableJSON

    • 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
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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
              Reporter:
              Marcos José Grillo Ramirez
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: