The targetOpTimeCB callback can capture an invalid lock.

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 8.2.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Replication
    • Fully Compatible
    • ALL
    • Repl 2025-03-31
    • 200
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      The targetOpTimeCB callback captures the lock by reference, however this callback is run in a future chain, when it is executed, this lock can no longer be valid.

      When we call those functions to fulfill the a replication waiter's promise, the targetOpTimeCB callback will be executed by the same thread, but this thread holds a different lock than the one targetOpTimeCB captured.

      This is caused by SERVER-90314. Prior to SERVER-90314, this was not an issue because we were not passing WithLock explicitly everywhere so no need to capture the lock.

            Assignee:
            Brad Cater
            Reporter:
            Wenbin Zhu
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: