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

AsyncResultsMerger can block networking threads in callbacks

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Critical - P2
    • Resolution: Gone away
    • 3.2.20, 3.4.15
    • None
    • Internal Code
    • None
    • ALL

    Description

      • The AsyncResultsMerger holds a lock while it runs callbacks, and while it calls nextEvent()
      • running askForNextBatch_inlock does repl targetting
      • repl targetting can hang for up to 20 seconds

      The bad scenario is:

      • Bunch of remotes are established
      • The first host suceeds in targetting and runs
      • The second host cannot satisfy it's read pref, blocking holding a lock in nextEvent()
      • The first request comes back, blocking on the mutex waiting to call handleBatchResponse

      If you have enough of those, you saturate all the background networking threads and hang your mongos.

      This isn't a problem in 3.6 and later because targetting was moved into the ARS and SERVER-34582 fixes the problem there

      Attachments

        Issue Links

          Activity

            People

              backlog-server-sharding Backlog - Sharding Team
              jason.carey@mongodb.com Jason Carey
              Votes:
              0 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: