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

    XMLWordPrintable

Details

    • Task
    • Status: Closed
    • Major - P3
    • Resolution: Done
    • None
    • None
    • 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

    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.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: