When you create an index in MongoDb. There are 2 options:
- Do foreground indexing and lock all write operations while doing so
- Do background indexing and still allow records to be written in the mean time
My question is:
How can something like unique index be built in the background? What if a duplicated document is inserted while the index is building?
