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

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: 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
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      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
            Reporter:
            Lingzhi Deng
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: