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

check if prepareStartTime is set before calculating getPreparedDuration

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 4.1.6
    • None
    • Replication
    • None
    • Fully Compatible
    • ALL
    • Repl 2018-12-03
    • 59

    Description

      When a transaction has been open for long enough, it will be considered a slow transaction and we will write a slow transaction log upon commit or an abort. For prepared transactions, we log the prepared duration in the slow transaction logs. If an exception is thrown in prepareTransaction in between setting the transaction state to "prepared" and TransactionMetricsObserver.onPrepare within a slow transaction, then system will crash with an invariant failure in getPreparedDuration since the prepareStartTime was never set to be larger than 0.

      Attachments

        Activity

          People

            jason.chan@mongodb.com Jason Chan
            jason.chan@mongodb.com Jason Chan
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: