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

The connection pool's ASIOTimer needs more synchronization and shared state to work with asio's timer

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • 3.1.9
    • 3.1.8
    • Networking
    • None
    • Fully Compatible
    • ALL
    • Platform 9 (09/18/15)

    Description

      asio's underlying timers have fairly loose behavior on cancel. Specifically, a cancelled callback can be invoked with or without the cancelled error code.

      In the case of dtors that invoke callbacks, this means that we must have a shared pointer around with a lifetime longer than the actual ASIOTimer so that we can check if we've been cancelled (because we can't look at the original object).

      In addition, we can call cancel/set multiple times, so we should keep a counter around so we know if the callback we're in should be invoked, even if the timer itself is currently active

      Attachments

        Activity

          People

            mira.carey@mongodb.com Mira Carey
            mira.carey@mongodb.com Mira Carey
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: