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

Make post-downgrade retry error for retryable writes that are executed using internal transactions consistent

    • Type: Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Sharding NYC

      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 didn't make setFCV unset/set the "state" field in the config.transactions entry for the parent session as part of that write. So a retry after a downgrade would get an IncompleteTransactionHistory with the message "Cannot retry a retryable write that has been converted into a transaction" if the previous txnNumber on the parent session corresponds to a transaction and "Incomplete history detected for transaction" if the previous txnNumber on the parent session corresponds to a retryable write. We should make it such that there can only be one kind of error message. One way to do is this to unset the "state" field or set it "committed".

            Assignee:
            backlog-server-sharding-nyc [DO NOT USE] Backlog - Sharding NYC
            Reporter:
            cheahuychou.mao@mongodb.com Cheahuychou Mao
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: