Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-45378

IndexBuildsCoordinator::_setUpIndexBuild() can throw exceptions which should be caught and clean (unregister) the index build

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.3.4
    • Affects Version/s: None
    • Component/s: Storage
    • None
    • Fully Compatible
    • ALL
    • Execution Team 2020-02-10
    • 23

       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.

            Assignee:
            benety.goh@mongodb.com Benety Goh
            Reporter:
            suganthi.mani@mongodb.com Suganthi Mani
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: