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

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 4.3.1, 4.2.2
    • Replication
    • None
    • Fully Compatible
    • ALL
    • v4.2
    • Repl 2019-11-04
    • 8

    Description

      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".

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: