The "IndexBuildsCoordinatorMongod" thread can throw DB exception "ErrorCodes::MaxTimeMSExpired" if the opCtx deadline gets expired. Currently, we acquire locks here in IndexBuildsCoordinator::_setUpIndexBuild which are allowed to throw exceptions. But, we don't catch those exceptions for _setUpIndexBuild(). This can result in server to crash. I feel, we should follow exception handling something similar to IndexBuildsCoordinator::_runIndexBuild.. On catching the exception, we should also make sure we cleanup(unregister) the index build.
- is related to
-
SERVER-45933 2 phase index build running with maxTimeMS can lead to undesirable behavior like server crash.
- Closed
-
SERVER-37643 add createIndexes command logic to the index build interface
- Closed