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.

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.7.0, 4.4.2
    • Affects Version/s: None
    • Component/s: Index Maintenance
    • None
    • Fully Compatible
    • ALL
    • v4.4
    • Execution Team 2020-06-29, Execution Team 2020-07-13
    • 6

      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.

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

              Created:
              Updated:
              Resolved: