[SERVER-61356] investigate condition in collMod unique index conversion code during tenant migration for duplicate checks Created: 09/Nov/21  Updated: 08/Feb/22  Resolved: 07/Feb/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Major - P3
Reporter: Benety Goh Assignee: Shin Yee Tan
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-61159 Check for duplicates before convertin... Closed
Sprint: Execution Team 2022-02-07, Execution Team 2022-02-21
Participants:

 Description   

When collMod is converting an index to unique, it needs to scan the index for duplicates before proceeding with the conversion. In SERVER-61159, we determine if it is possible to skip this check based on the current oplog application mode. Since tenant migration and initial sync present the same mode to the collMod implementation, we should investigate if it is still safe to skip the duplicate checking in the tenant migration case.



 Comments   
Comment by Githook User [ 08/Feb/22 ]

Author:

{'name': 'Shin Yee Tan', 'email': 'shinyee.tan@mongodb.com', 'username': 'shinyeet'}

Message: SERVER-61356 Modify comment to explain condition in collMod unique index conversion code during tenant migration for duplicate checks
Branch: master
https://github.com/mongodb/mongo/commit/60474aa14a6488889ec73c8760f3d907a28fec3a

Comment by Shin Yee Tan [ 07/Feb/22 ]

It is safe to skip the duplicate check in the tenant migration case because we assume the source cluster will have performed the check. When the oplog application mode is kInitialSync on the destination cluster, we can skip checking.

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