-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: 5.1 Required
-
Component/s: Replication
-
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.