Currently createIndexes command takes the locks it needs to actual create an index. If the index already exists (as is the case in a lot of scenarios where "just in case" createIndex is sent periodically or before running some process) concurrency could benefit significantly from checking if the index already exists under a weak lock.
This would benefit cases where the index exists as is (success returned) or the index exists but with different options (failure returned) - neither of these would contribute to command requiring a strong lock.
- causes
-
SERVER-36921 Transaction lock timeout errors when running transactions concurrently with Logical Session Cache refreshes
- Closed
- is related to
-
SERVER-36954 server keeps trying to create an index on system.sessions
- Closed
- related to
-
SERVER-47268 noop_createIndexes_not_blocked_by_txn.js fails on snapshot errors within a transaction
- Closed