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

Allow a shardsvr tenant migration recipient to create collections directly on itself

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 5.2.0
    • None
    • None
    • None
    • Fully Compatible
    • Server Serverless 2021-11-15

    Description

      On shardsvr replica sets, the ShardServerOpObserver throws  CannotImplicitlyCreateCollection when creating a new collection unless the OperationShardingState has _allowCollectionCreation set to true.

      (OperationShardingState is a decoration on the OperationContext; see here for more about decorations.)

      This is so that we as developers are aware of all places collection creation can occur, verify they are synchronized with the database critical section, and explicitly enable them using this guard.

      This ticket is to add the guard where the tenant migration recipient creates collections during the bulk clone (similar to the guard where the moveChunk recipient creates collections), so that we can run tenant migrations on shardsvrs.

      This ticket should add a test that a tenant migration succeeds when there is pre-existing data for the tenant on the donor. 

      Attachments

        Activity

          People

            sophia.tan@mongodb.com Sophia Tan
            esha.maharishi@mongodb.com Esha Maharishi (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: