[SERVER-60312] [POC] use collMod to change a non-unique index into a unique index Created: 29/Sep/21  Updated: 15/Nov/21  Resolved: 15/Nov/21

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

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

Issue Links:
Related
related to SERVER-61486 Investigate work needed to track dupl... Closed
is related to SERVER-60314 Investigate adding collMod command op... Closed
is related to SERVER-34263 Make new format unique index creation... Closed
is related to SERVER-46865 collMod should not take database MODE... Closed
Sprint: Execution Team 2021-10-04, Execution Team 2021-10-18, Execution Team 2021-11-01, Execution Team 2021-11-15, Execution Team 2021-11-29
Participants:

 Description   

Investigate the work required to use collMod on a non-unique index to make it unique.

Considerations:

  • Should we introduce a "dry-run" mode so that we don't reinforce uniqueness immediately? This could help return conflicts iteratively.
  • It's unacceptable for collMod to block all writes to the collection being modified. For unique indexes, we should only have to block incoming inserts that violate the uniqueness constraint.
  • Two phase collMod? First phase: Block new inserts that would violate the uniqueness constraint. Second phase: Actually do an index scan to see if an index is consistent.


 Comments   
Comment by Benety Goh [ 15/Nov/21 ]

To be continued in SERVER-61486

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