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

Ensure all exhaust tasks are erased from task executor queue

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.7.0
    • Affects Version/s: None
    • Component/s: Sharding
    • Labels:
      None
    • Fully Compatible
    • ALL
    • Service arch 2020-05-04

      It is possible that a client receives multiple isMaster responses in quick succession when using the streamable protocol. The task executor layer keeps track of tasks in a queue and holds an iterator pointing to the task. If multiple responses are received super quickly (within about a ms of one another), the later responses can overwrite the iterator value for a task when adding the new task to the queue if the previous responses have not been run yet. This means we would not erase one or more tasks from the task executor's queue because we lose track of the iterator and can hang at shutdown. We can fix this by keeping track of what we expect the iterator to be and compare when running the callback and removing the task, use the appropriate iterator.

            Assignee:
            janna.golden@mongodb.com Janna Golden
            Reporter:
            janna.golden@mongodb.com Janna Golden
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: