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

Secondary oplog application failure for prepared internal transactions that span an FCV change

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 6.0.0-rc4, 6.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Fully Compatible
    • v6.0
    • Sharding 2022-05-02

      Consider a replica set with a primary and a secondary:

      1. The FCV is 6.0. An internal transaction (one with the new session id format) begins on the primary and passes this FCV check.
      2. The setFCV command starts and updates the target version in the FCV document to 5.0. The in-memory FCV is now "downgrading to 5.0". 
      3. Right before the setFCV command starts aborting unprepared transactions, the internal transaction above enters the prepared state. So the internal transaction does not get aborted.
      4. The secondary applies the write to the FCV document and updates its in-memory FCV "downgrading to 5.0". 
      5. The secondary applies the applyOps oplog entries for the prepared internal transaction but cannot to do so because of the the FCV check above so it hits this fassert.

      The issue is that the secondary shouldn't check the FCV since the check has already been done by the primary. 

            Assignee:
            cheahuychou.mao@mongodb.com Cheahuychou Mao
            Reporter:
            cheahuychou.mao@mongodb.com Cheahuychou Mao
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: