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

[Retryability] Make resharding handle applyOps oplog entries with WouldChangeOwningShard sentinel noop entry

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 5.3.1
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • Fully Compatible
    • Sharding NYC 2022-03-21, Sharding NYC 2022-04-04

      SERVER-59186 makes mongos use internal transactions to handle WouldChangeOwningShard update and findAndModify. As a result, mongos no longer uses the client txnNumber to run the transaction that handles the WouldChangeOwningShard error. To make a retry still fail with an IncompleteTransactionHistory error, SERVER-63366 introduced the notion of WouldChangeOwningShard sentinel operation entry to trigger to an IncompleteTransactionHistory error on retries. So applyOps oplog entries for retryable internal transactions can now contain a noop (i.e. no CRUD) operation, this is expected to lead to an error during resharding since it doesn't expect to see a non CRUD operation in an applyOps oplog entry.

            cheahuychou.mao@mongodb.com Cheahuychou Mao
            cheahuychou.mao@mongodb.com Cheahuychou Mao
            0 Vote for this issue
            4 Start watching this issue