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

AsioNetworkBaton::detachImpl doesn't clear the _timersById map

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.1.0-rc0, 8.0.0-rc6, 7.0.13
    • Affects Version/s: None
    • Component/s: None
    • None
    • Service Arch
    • Fully Compatible
    • ALL
    • v8.0, v7.0, v6.0, v5.0
    • Programmability 2024-05-27
    • 200

      AsioNetworkingBaton::detachImpl doesn't clear the _timersById map. Once a baton has detached, it shouldn't have any active timers. That is, when AsioNetworkingBaton::_cancelTimer is called after detachment, it should not see a nonempty _timersById map. Have detachImpl also clear the _timersById map. Additionally, document the fact that timers which are still active at detachment time will be cancelled at an unspecified time in the contet of detachment (i.e., those timers will no longer be available to other threads for cancellation and inline continuation execution)

      Additionally, the _cancelTimer method, which is marked noexcept, calls _safeExecute which is not marked noexcept. It's likely other methods follow a similar pattern in this class. Let's take this opportunity to try to remove some of the noexcept declarations, or at least reinstrument the code so that we don't have noexcept methods calling non-noexcept methods.

            Assignee:
            james.bronsted@mongodb.com James Bronsted
            Reporter:
            james.bronsted@mongodb.com James Bronsted
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: