[SERVER-61486] Investigate work needed to track duplicate key violations before unique index conversion time Created: 15/Nov/21  Updated: 29/Oct/23  Resolved: 05/Dec/21

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

Type: Task Priority: Major - P3
Reporter: Pavithra Vetriselvan Assignee: Benety Goh
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-61922 collmod_convert_to_unique_side_writes... Closed
related to SERVER-61912 Investigate rescanning an index vs pr... Closed
related to SERVER-61913 Investigate tracking deletes for uniq... Closed
is related to SERVER-60312 [POC] use collMod to change a non-uni... Closed
is related to SERVER-516 yield on multi-update Closed
Backwards Compatibility: Fully Compatible
Sprint: Execution Team 2021-11-29, Execution Team 2021-12-13
Participants:

 Description   

It's a requirement for the index conversion time to be relative to the number of violations instead of the size of the index itself.

This ticket should look into reusing the DuplicateKeyTracker to keep track of uniqueness violations instead of relying on a full index scan.



 Comments   
Comment by Benety Goh [ 05/Dec/22 ]

In this commit, we added a couple of wrappers around startParallelShell, which began life in SERVER-516 in this commit.

Comment by Githook User [ 04/Dec/21 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-61486 avoid full index scan during unique index conversion

Extracts keys from documents changed after start of conversion to
determine if duplicates exist in the converted index.
Branch: master
https://github.com/mongodb/mongo/commit/fbe42b59f77c645413ebb60f6d11df7acf9612ee

Comment by Githook User [ 04/Dec/21 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-61486 add test and fail point to check collMod handling of side writes while converting an index to unique
Branch: master
https://github.com/mongodb/mongo/commit/cace8e673b5341fd5a2c570784d1b40f2ff1e5a5

Comment by Githook User [ 04/Dec/21 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-61486 collMod tracks side writes during unique index conversion
Branch: master
https://github.com/mongodb/mongo/commit/a4cc735b9ec8d826e22cc6e3edeae17c2fd17261

Comment by Githook User [ 04/Dec/21 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-61486 add test case for non-existent namespace for unique index conversion
Branch: master
https://github.com/mongodb/mongo/commit/cd2787ff5e94fc051750b0d7f0700c93fe867f6a

Comment by Githook User [ 04/Dec/21 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-61486 scanIndexForDuplicates() accepts optional KeyString::Value and limit
Branch: master
https://github.com/mongodb/mongo/commit/48eb54377e8df6abac0c62f276840a16bd772376

Comment by Githook User [ 04/Dec/21 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-61486 add parallel shell helpers for running commands
Branch: master
https://github.com/mongodb/mongo/commit/d46a365b846e66cefcad000f95754cf285e6dd0f

Comment by Githook User [ 03/Dec/21 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-61486 add CollModOpObserver
Branch: master
https://github.com/mongodb/mongo/commit/45f378b3ba9c5f7b10ec6e8186e8651e7a46c9ad

Comment by Githook User [ 03/Dec/21 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-61486 add CollModWriteOpsTracker
Branch: master
https://github.com/mongodb/mongo/commit/32d5eaacb19f9730a70fea1e1627c2df2fe23265

Comment by Benety Goh [ 03/Dec/21 ]

Follow up work detailed in SERVER-61912 and SERVER-61913.

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