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

Test that background index build do not block on prepared transactions on secondaries

    XMLWordPrintable

    Details

    • Operating System:
      ALL
    • Sprint:
      Storage NYC 2018-11-05

      Description

      Background index build on secondaries acquires a database lock in X mode and releases it at the beginning, scans the collection with IX lock, and acquires an X lock at the end. The first X lock is acquired by the background job but the running command waits for it, so it won't conflict with transaction operations. The IX lock plays well with transactions. However, the final X lock will cause problem on secondaries.

      If the background index build completion is blocked by a prepared transaction and replication application on the same database is blocked by the background index build completion. That's a deadlock. The problem is similar to the 2-phase drop locking issue we've seen in SERVER-34349.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              backlog-server-repl Backlog - Replication Team
              Reporter:
              siyuan.zhou Siyuan Zhou
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              12 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: