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

dropIndexes needs to make the same assertions on primary and secondary nodes

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical - P2
    • Resolution: Fixed
    • Affects Version/s: 4.4.0
    • Fix Version/s: 4.9.0, 4.4.5
    • Component/s: None
    • Labels:
      None
    • Backwards Compatibility:
      Minor Change
    • Operating System:
      ALL
    • Backport Requested:
      v4.4
    • Sprint:
      Execution Team 2021-03-08
    • Linked BF Score:
      142

      Description

      The applyOps path for dropIndexes makes an assertion that the primary does not. This can lead to a bug that generates an invalid oplog sequence and causes all secondaries to stop replicating.

      There is a bug that can be described by the following sequence in its simplest form:

      • Start building an index A
      • dropIndexes aborts A and yields its locks
      • Start building a new index build on A and commit
      • Start building an index B
      • dropIndexes reacquires its locks and sees that A is not in progress anymore, so it moves on to replicate a dropIndexes oplog entry instead.
      • The secondary sees the dropIndexes oplog entry for A but blocks in the applyOps path because B is still in progress, something that did not happen on the primary.

      We need to either a) assert on the primary that no index builds are in progress when a single index is dropped, or b) remove the assertion for the applyOps path.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              gregory.wlodarek Gregory Wlodarek
              Reporter:
              louis.williams Louis Williams
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: