Investigate that PreImagesTruncateManager on Secondaries takes PBWM lock

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 7.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • ALL
    • Execution EMEA Team 2023-07-10, Execution EMEA Team 2023-07-24, Execution EMEA Team 2023-08-07
    • 114
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      During truncate marker initiailisation on a secondary, the PBWM lock is acquired in MODE_IS by default.

      A deadlock can happen as follows:

      • There is a large prepared transaction, the primary waits for the commit to be replicated
      • The OplogApplier on the secondary tries to apply a new batch with the commit, but needs to acquire the PBWM lock in MODE_X
      • The ChangeStreamExpiredPreImagesRemover initialisation acquired the PBWM lock in MODE_IS, but gets stuck waiting for the prepared transaction to commit or abort, but it can't because it needs the PBWM lock.

              Assignee:
              Haley Connelly
              Reporter:
              Haley Connelly
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved: