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

invokeWithSessionCheckedOut being called on prepared transactions on secondaries

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 4.9.0, 4.4.6, 4.2.16
    • Replication
    • None
    • Fully Compatible
    • ALL
    • v4.4, v4.2
    • Repl 2020-09-21, Repl 2020-11-02, Repl 2020-11-16, Repl 2020-11-30, Repl 2020-12-14, Repl 2020-12-28, Repl 2021-01-11, Repl 2021-01-25
    • 17

    Description

      I think there is a race condition between this preliminary check and the attempt to invokeWithSessionCheckedOut. If a primary node passes the preliminary check but immediately steps down, then it could end up calling invokeWithSessionCheckedOut and refreshFromStorageIfNeeded on a session that may have started a new transaction on the new primary. If the new primary prepares a transaction in the same session and the prepared transaction has replicated to this secondary node that just stepped down, then when the secondary node calls refreshFromStorageIfNeeded, it ends up hitting this MONGO_UNREACHABLE.

      Attachments

        1. diff
          9 kB

        Issue Links

          Activity

            People

              samy.lanka@mongodb.com Samyukta Lanka
              lingzhi.deng@mongodb.com Lingzhi Deng
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: