In order to commit, an index build takes an X lock on its on its collection after explicitly unlocking the RSTL. Then a createIndexes command enqueues a collection IS lock (which implicitly takes the RSTL in IX) in order to check the TTL options on the command object. Now a step down occurs, enqueuing the RSTL in mode X. Now the index build attempts to take a collection IX lock on the config.system.indexBuilds collection, which first enqueues the RSTL in IX since it was previously unlocked. Thus a three-way deadlock has been reached. It seems the issue is that we should be waiting to re-acquire the RSTL until the subsequent timeout-retry logic.
- Votes:
-
0 Vote for this issue
- Watchers:
-
4 Start watching this issue
- Created:
- Updated:
- Resolved: