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

Concurrent 'createIndexes' can block all write operations on a primary and standalone by exhausting write tickets.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.7.0, 4.4.2
    • Component/s: Index Maintenance
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Requested:
      v4.4
    • Sprint:
      Execution Team 2020-06-29, Execution Team 2020-07-13
    • Linked BF Score:
      6

      Description

      We can get into below 2 way deadlock which will block all write operations on a primary and standalone.
      1) 'createIndexes' cmd user threads waits on a conditional variable for indexBuildCoordinator worker threads to get freed up, by holding global lock in IX mode. When global lock is in IX mode is acquired, we implicitly acquire a write ticket. So, those 'createIndexes' threads are waiting for indexBuildsCoordinator worker thread to get freed up by holding write tickets and eventually exhausting those write tickets.

      2) IndexBuildsCoordinator worker threads are waiting for write tickets (For e.g., when restoring yielded locks during collection scan phase) for index completion.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              benety.goh Benety Goh
              Reporter:
              suganthi.mani Suganthi Mani
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: