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

Tenant migration fails to fetch all txn oplog entries for a txn with commit opTime equal to startFetchingDonorOpTime

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 5.3.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Fully Compatible
    • v5.2, v5.1
    • 183

      When getting the start fetch time from a donor during a tenant migration, if the last oplog entry on the donor is for a commit transaction and this transaction spanned multiple oplog entries, the recipient will not fetch the transaction's previous oplog entries. Currently, if a transaction commits before the start fetch timestamp, we walk its oplog chain to fetch all oplog entries in the transaction. For any transactions that haven't yet committed, we'll change the start fetch time to be equal to startOpTime of the transaction to make sure we fetch all oplog entries for any open transactions. However, if a transaction commits at exactly the start fetch op time, we skip fetching its chain entirely. When applying oplog entries, the recipient will attempt to apply the commit transaction entry, but won't have fetched any previous oplog entries for the transaction and will fail with NoSuchKey, aborting the transaction.

      A repro is attached.

            Assignee:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Reporter:
            janna.golden@mongodb.com Janna Golden
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: