Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-14257

Investigate changes in SERVER-54608: dropIndexes needs to make the same assertions on primary and secondary nodes

    XMLWordPrintableJSON

Details

    • Task
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 4.9.0, 4.4.5
    • manual, Server
    • None
    • ServerDocs2020: Mar9 - Mar16, ServerDocs2020: Mar16 - Mar23, ServerDocs2020: Mar23 - Mar30, ServerDocs2020: Mar30 - Apr06, ServerDocs2020: Apr6 - Apr13, ServerDocs2020: Apr13 - Apr20, ServerDocs2020: Apr20 - Apr27, ServerDocs2020: Apr27 - May4, ServerDocs2020: May4 - May11, ServerDocs2020: May11 - May18, ServerDocs2020: May18 - May25, ServerDocs2020: May25 - Jun1, ServerDocs2021: Jun1 - Jun8

    Description

      Description

      Downstream Change Summary

      The dropIndexes command cannot drop any ready indexes while there are any in-progress index builds.

      Description of Linked Ticket

      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.

      Scope of changes

      Impact to Other Docs

      MVP (Work and Date)

      Resources (Scope or Design Docs, Invision, etc.)

      Attachments

        Issue Links

          Activity

            People

              ian.fogelman@mongodb.com Ian Fogelman
              backlog-server-pm Backlog - Core Eng Program Management Team
              Jess Mokrzecki Jess Mokrzecki
              Jason Price Jason Price
              Gregory Wlodarek
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                1 year, 42 weeks ago