|
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.
|