-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: 4.0.0
-
Component/s: None
-
None
-
Fully Compatible
-
ALL
-
Execution Team 2019-09-23, Execution Team 2019-10-07, Execution Team 2019-10-21
In 4.0, we have a cleanup handler in repairDatabase that re-opens the database and its collections when the function exits. If an exception is thrown while repairing a collection, this cleanup handler attempts to re-open all collections before the active exception is caught and reported.
If a single collection repair fails by throwing an exception, the cleanup handler tries to re-open all collections in the database before exiting the function. If a failure occurs before all collections have been repaired, the RecordStores may not be reinitialized by a call to reinitCollectionAfterRepair and leads to a fatal assertion. The results in the cleanup handler's error suppressing any actual cause of failure.
This is not a problem in 4.2 because of the work done by SERVER-40126, but I don't believe this is something we can backport.