In SERVER-42123, we started suppressing WriteConflicts in debug builds when calling numIndexesTotal(), which reads from the durable catalog.
Unfortunately it is not correct to ignore WriteConflicts. The storage engine may choose to abort a transaction at any time, often due to cache pressure. When the storage engine does abort an operation, it throws a WriteConflictException. If an operation ignores this error, it will continue to commit the operation instead. This will lead to the following error from WiredTiger:
WiredTiger error (22) [1573582080:566402][25006:0x7f3c19192700], WT_SESSION.commit_transaction: __session_commit_transaction, 1649: failed transaction requires rollback: oldest transaction ID rolled back for eviction
We should solve the original problem described in SERVER-42123 in a different way. This may involve reverting the original code.