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

recover_multiple_prepared_transactions_startup.js test should wait for majority commit point to advance before committing a prepared transaction

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.3.1, 4.2.2
    • Affects Version/s: None
    • Component/s: Replication
    • None
    • Fully Compatible
    • ALL
    • v4.2
    • Repl 2019-11-04
    • 8

      recover_multiple_prepared_transactions_startup.js test should wait for majority commit point to advance before committing a prepared transaction.

      Even though the test was running with a single node, after a restart, the lastCommitted is not set until the _firstOpTimeOfMyTerm is durable ( i.e. flushed) and by default we use the lastDurable to calculate the commit point. Therefore, the test races with the WTJournalFlusher thread flushing the first oplog entry after the restart. Committing a prepared transaction with lastCommitted being null is not allowed and will give error "commitTransaction for a prepared transaction cannot be run before its prepare oplog entry has been majority committed".

            Assignee:
            lingzhi.deng@mongodb.com Lingzhi Deng
            Reporter:
            lingzhi.deng@mongodb.com Lingzhi Deng
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: