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

ReshardingOplogBatchApplier and ReshardingTxnCloner should wait for conflicting transaction to complete upon hitting RetryableTransactionInProgress

    • 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
    • 55

      RetryableTransactionInProgress is an error that is thrown by TransactionParticipant::beginOrContinue() when we try to begin/continue a retryable write or begin an internal transaction for that retryable write while there is an in-progress internal transaction for it. The ReshardingOplogBatchApplier and ReshardingTxnCloner can hit this error if it happens to be writing noop oplog entries for a retryable write that has been executed in an internal transaction with the recipient shard as one of the participant shards while there is a retry in progress. Therefore, upon receiving a RetryableTransactionInProgress error, withSessionCheckedOut should return the completion future for the in-progress internal transaction so that the ReshardingOplogBatchApplier and ReshardingTxnCloner wait for the transaction to complete and retry just like they do for prepared transactions here and here. This is what the ServiceEntryPoint does.

            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: