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

Index builds must set the PrepareConflictBehavior::kIgnoreConflictsAllowWrites flag on the RecoveryUnit on resume in the drain phase

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 5.0.0-rc0
    • Affects Version/s: None
    • Component/s: Storage
    • Labels:
      None
    • Fully Compatible
    • ALL
    • Execution Team 2021-05-17
    • 150

      A resumed index build goes through this if-else-if statement in the index build code wherein mutual setup code sets the PrepareConflictBehavior::kIgnoreConflictsAllowWrites flag on the RecoveryUnit. Setting that flag avoids a possible invariant check that the index build thread is killable (to avoid prepare conflict deadlocks).

      The drain phase does not execute the if-else-if code, it is the undefined else situation. For that else situation (drain phase) we still need to set the PrepareConflictBehavior::kIgnoreConflictsAllowWrites flag on the RecoveryUnit. I recommend pulling the mutual code up, so it's more clear that the flag is set and more difficult to accidentally forget.

            Assignee:
            gregory.wlodarek@mongodb.com Gregory Wlodarek
            Reporter:
            dianna.hohensee@mongodb.com Dianna Hohensee (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: