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

Collection recreated on a dropped view namespace should be handled correctly on logical tenant collection cloner resume.

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 6.0.0-rc0, 5.3.0-rc2, 5.2.2
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • ALL
    • v5.3, v5.2
    • Server Serverless 2022-02-07, Server Serverless 2022-02-21
    • 35

      1) Donor: Creates a view for ns db.coll. This in-turn does the following ops.

       - Create a collection db.system.views.
       - Insert a document w/ _id as db.coll into db.system.views collection.

      2) Recipient primary: Start migration and clones db.system.views collection and replicates to secondaries.
      3) Recipient secondary: Receives the insert to ns db.system.views oplog entry, this in-turn cause insert op-observer to register the view for the namespace specified in the _id field, (in this case, it's db.coll).
      4) Donor: Drop the view db.coll and re-create a regular collection on ns db.coll.
      5) Recipient's current primary steps down and fails over to new primary.
      6) Recipient new primary: Starts migration and tenant cloner resumes and tries to clone the collection db.coll.

      This would result the migration to fail due to collection cloner failure NamespaceExists w/ error message View already exists

      Note: This problem applies only to tenant migration machinery not for logical initial initial sync as logical initial sync machinery doesn't have the capability to resume the database cloner.

            Assignee:
            suganthi.mani@mongodb.com Suganthi Mani
            Reporter:
            suganthi.mani@mongodb.com Suganthi Mani
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: