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

Allow retrying commitTransaction across back-to-back migrations

    XMLWordPrintable

    Details

    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Requested:
      v5.0
    • Sprint:
      Repl 2021-05-17, Repl 2021-05-31

      Description

      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.

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved: