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

setFCV may need to wait for transactionLifetimeLimitSeconds

    • Type: Icon: Task Task
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Replication

      Consider the following scenario:

      • setFCV on shard0 aborts unprepared transactions
      • mongos starts a cross-shard transaction and hands off two-phase commit to shard0
      • setFCV starts trying to acquire the global S lock in order to wait for existing (prepared) transactions to commit or abort
      • shard0 cannot starts two-phase commit since it needs to persist the participant list and that requires the IX lock on the config.transaction_coordinators collection.
      • setFCV needs to wait until the transaction above times out (i.e. wait for transactionLifetimeLimitSeconds) and gets aborted by the abortExpiredTransactions reaper.

      SERVER-65821 is introducing a way to allow TransactionCoordinator to bypass setFCV when persisting the commit/abort decision. So adding that to the "persist participant list" step would allow the transaction above to enter prepare and then commit or abort so setFCV would not need to wait for transactionLifetimeLimitSeconds. However, this would allow more transactions to enter prepare concurrently with setFCV and depending on how long those transactions take, setFCV can end up waiting longer.

            Assignee:
            backlog-server-repl [DO NOT USE] Backlog - Replication Team
            Reporter:
            cheahuychou.mao@mongodb.com Cheahuychou Mao
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated: