[SERVER-56527] Tenant oplog applier may createIndex on non-empty collections Created: 30/Apr/21  Updated: 29/Oct/23  Resolved: 06/May/21

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 4.9.0-rc1, 5.0.0-rc0

Type: Bug Priority: Major - P3
Reporter: Lingzhi Deng Assignee: Lingzhi Deng
Resolution: Fixed Votes: 0
Labels: pm-1791_non-cloud-blocking, pm-1791_other_required, post-rc0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v4.9
Sprint: Repl 2021-05-17
Participants:
Linked BF Score: 55

 Description   

If we have this sequence on the donor:
1. createCollection foo
2. createIndex unique index {x: 1} on foo
3. dropIndex
4. insert some documents to foo that violate uniqueness on x
------
After cloning, the recipient could clone documents in foo without index idx. And in the tenant oplog application phase, the tenant oplog applier would apply 2. and fail this invariant because during tenant oplog application we relax constraints.



 Comments   
Comment by Githook User [ 07/May/21 ]

Author:

{'name': 'Lingzhi Deng', 'email': 'lingzhi.deng@mongodb.com', 'username': 'ldennis'}

Message: SERVER-56527: Tenant migration recipient should ignore createIndex on non-empty collections

(cherry picked from commit 635f61f317fd88b840588f68d0f38211fc5cabcb)
Branch: v4.9
https://github.com/mongodb/mongo/commit/c4682b4161241d6829b38a397d8c3f263ae39d01

Comment by Githook User [ 06/May/21 ]

Author:

{'name': 'Lingzhi Deng', 'email': 'lingzhi.deng@mongodb.com', 'username': 'ldennis'}

Message: SERVER-56527: Tenant migration recipient should ignore createIndex on non-empty collections
Branch: master
https://github.com/mongodb/mongo/commit/635f61f317fd88b840588f68d0f38211fc5cabcb

Generated at Thu Feb 08 05:39:30 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.