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

MultiIndexBlock builder can incorrectly change an InterruptedAtShutdown error into a uassert

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.7.6
    • Affects Version/s: None
    • Component/s: Index Maintenance, Storage
    • Labels:
      None
    • Minor Change
    • Storage NYC 2018-04-23
    • 59

      The `IndexBuilder` class is used for secondaries to build indexes. A secondary receiving a message (oplog) to build an index implies the index must exist, thus if the index build has an error, there is logic to crash the node. Notably, the "interrupted" (for shutdown) error code is exempt from crashing.

      Errors can come up while an index build is iterating through documents, including being interrupted for shutdown. However, the code indiscriminately turns all errors into a `uassert`.

      This uassert is not treated by the former fassert as an interruption error, crashing the server instead of performing a graceful shutdown.

      Note: I did confirm that the clean shutdown and the crashing cases both leave the index in an "unready" state and will be rebuilt when the node comes back up.

            Assignee:
            milkie@mongodb.com Eric Milkie
            Reporter:
            daniel.gottlieb@mongodb.com Daniel Gottlieb (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: