In a sharded cluster there is a race condition where dropping a database while building an index can cause a server crash if the abort happens while holding the critical section "lock" for the database.
This causes the following invariant to get hit as the error is a StaleDbVersion due to the drop command.
Aborting an index while dropping the database should catch the fact we are dropping the database and handle it appropriately by cleaning up.
- is related to
-
SERVER-69794 Investigate support for excluding sharding critical section checks in AutoGet
- Closed
- related to
-
SERVER-79150 Reduce ScopedSetShardRole scope to setup stage of index build
- Closed