Allow retrying commitTransaction across back-to-back migrations

XMLWordPrintableJSON

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

      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
            Reporter:
            Xuerui Fa
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: