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

Investigate that PreImagesTruncateManager on Secondaries takes PBWM lock

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 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

      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@mongodb.com Haley Connelly
            Reporter:
            haley.connelly@mongodb.com Haley Connelly
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: