Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-60312

[POC] use collMod to change a non-unique index into a unique index

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • 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

      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.

            Assignee:
            benety.goh@mongodb.com Benety Goh
            Reporter:
            pavithra.vetriselvan@mongodb.com Pavithra Vetriselvan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: