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

Avoid invariant due to in progress index build during initial sync

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.2.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • ALL
    • Execution EMEA Team 2023-10-16, Execution EMEA Team 2023-10-30
    • 120

      The attached reproducer consistently crashes the server.

      The order of operations is as follows:

      • A secondary begins initial sync and sets the timestamp for the oplog replay
      • Primary creates a collection collA
      • Primary creates an index on the empty collection collA (this creates a createIndexes oplog entry)
      • Primary inserts some documents into collA
      • Primary drops the index of collA
      • Primary begins creating the index again in collA (this is a two phase index build)
      • Secondary clones the collection with the in-progress index build and proceeds to also create the index
      • Secondary replays the oplog and crashes due to the in-progress index build

        1. repro.js
          2 kB
          Jordi Olivares Provencio

            Assignee:
            jordi.olivares-provencio@mongodb.com Jordi Olivares Provencio
            Reporter:
            jordi.olivares-provencio@mongodb.com Jordi Olivares Provencio
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: