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

invokeWithSessionCheckedOut being called on prepared transactions on secondaries

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.9.0, 4.4.6, 4.2.16
    • Affects Version/s: None
    • Component/s: 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

      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.

        1. diff
          9 kB
          Lingzhi Deng

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

              Created:
              Updated:
              Resolved: