SERVER-74953 describes a situation where a stepdown occurs while an index build is in its early setup phase, immediately followed by a DDL operation that conflicts with the index build, like dropCollection. The now-secondary mongod attempts to replicate the dropCollection. Before SERVER-61481, replication would have detected the conflict and would have waited until no index build was in progress before retrying the operation. SERVER-61481 removed that logic, and since then this results in an invariant failure.
Note that this issue is very infrequent and results in one (and just one) secondary crash. Upon restart, the secondary is able to resume replication.
This ticket is to reintroduce part of the logic that was removed in SERVER-61481.
- is caused by
-
SERVER-61481 Remove check in dropIndexes command that no index builds are in progress for the collection once kLastLTS is 6.0
- Closed
- related to
-
SERVER-74953 Explore avoiding stepdowns during the early phases of index build setup
- Closed