ExportXMLWordPrintableJSON

    • Type: Task
    • Resolution: Won't Do
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Cluster Scalability
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Concurrent reshardings onto the same recipient all write retry history into that recipient's single config.transactions collection. Retries must give correct results, with no duplicate writes, however the two operations' writes interleave.

      Scenarios:

      • One retryable batch across A and B: a retryable insertMany on L with one statement going to A and one to B. Force each operator to record history first in turn. Retrying returns both original results, and the recipient has one linked history chain for that session and txnNumber.
      • Same transaction recorded by both operations: a multi-document transaction on L that writes to A and B. Run it as a small transaction, a large transaction split across several oplog entries, and a prepared transaction. Each operation should record it harmlessly. Re-running a statement from that transaction should fail safely.
      • One operation behind the other: a write on L at txnNumber 8 goes to B, then 9 goes to A. Hold B's applier until A has recorded 9. B's collection should have the txnNumber 8 document exactly once. Retrying 9 returns the original result, and retrying 8 gets TransactionTooOld.
      • One operation applying while the other clones session history: start A, run a retryable write on L that touches A and B, then start B. Run it in both orders. The statement routed to A returns its original result. The statement routed to B returns IncompleteTransactionHistory. Nothing is duplicated.
      • Live traffic after one operation commits: commit A while B is still applying. Then, on the same sessions, run retryable writes on A interleaved with writes headed to B at the same txnNumbers. Also run transactions on A that are committed, left open, and prepared; an abandoned transaction followed by a write at a higher txnNumber; and a WouldChangeOwningShard update on A while B records a higher txnNumber for the same parent session. Assert:
        • the open transaction is aborted
        • the prepared one makes B wait and then B completes
        • every retry returns the expected result
        • config.transactions ends at the highest txnNumber
      • findAndModify: retried findAndModify commands on L that touch A and B return their original pre- and post-images.
      • Stepdowns: repeat these scenarios with a recipient stepdown midway through applying, and again after both operations commit.

      Compare the results against a single-resharding baseline.

            Assignee:
            Unassigned
            Reporter:
            Anja Kalaba
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: