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.
- related to
-
SERVER-63764 fix macos dyld limit
- Closed
-
SERVER-80301 View/Timeseries recreated on a dropped regular collection namespace can cause tenant migration/logical initial sync to fail with 'commandNotSupportedOnView'
- Closed