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

invokeWithSessionCheckedOut being called on prepared transactions on secondaries

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.9.0, 4.4.6
    • Component/s: Replication
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Requested:
      v4.4, v4.2
    • Sprint:
      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
    • Linked BF Score:
      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

          Activity

            People

            Assignee:
            samy.lanka Samyukta Lanka
            Reporter:
            lingzhi.deng Lingzhi Deng
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: