The optimization done in
SERVER-43664 assumes that the first table checked in WiredTigerUtil::setTableLogging is the _mdb_catalog. However, there are no assertions to verify this claim. We should add such an assertion to prevent unexpected behaviour with the optimization if this were to change in the future. If, say, for some reason, the first table checked is part of the local database, the behaviour would be incorrect.
- related to
SERVER-43664 Speedup WiredTiger storage engine startup for many tables by optimizing WiredTigerUtil::setTableLogging()