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

Allow retrying commitTransaction across back-to-back migrations

    • Fully Compatible
    • ALL
    • v5.0
    • Repl 2021-05-17, Repl 2021-05-31

      Currently, tenant migrations supports retrying commitTransaction across a single migration. With the current implementation, retrying commitTransaction may not work if back-to-back tenant migrations occur.

      This is because when we create the transaction entry on the recipient of the first tenant migration, we set the lastWriteOpTime field to be an empty OpTime. In the aggregation pipeline for fetching these committed transactions, we use the lastWriteOpTime to find the corresponding oplog entry. Since lastWriteOpTime is empty, on the second tenant migration, the pipeline will not return the transaction entry. As a result, users will not be able to retry commitTransaction after the second tenant migration.

      This is probably not a major issue, since retrying a commitTransaction after a back-to-back migration is a rare situation.

            Assignee:
            lingzhi.deng@mongodb.com Lingzhi Deng
            Reporter:
            xuerui.fa@mongodb.com Xuerui Fa
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: