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

setFCV downgrade can overwrite the state for the latest txnNumber during internal transactions config.transactions entries removal

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 6.0.0-rc5, 6.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Fully Compatible
    • ALL
    • v6.0
    • Sharding NYC 2022-05-16

      SERVER-58761 made setFVC do the following:

      For each session that has an internal session that executed retryable internal transactions for a command with txnNumber (i.e. as indicated by its lsid.txnNumber) greater or equal to the latest txnNumber in the parent session, update the config.transactions entry for the parent session to have txnNumber equal to that lsid.txnNumber and lastWriteOpTime equal to {t: 1, ts: Timestamp(1, 0)}.

      However, it doesn't specify the "txnNum" field in the update query so if there is a new transaction or retryable write that starts and commits on the parent session between the write is issued by setFCV and when the write is applied, that write would end up overwriting the state for the latest txnNumber.

            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: