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

enable session_asio opportunistic writes with ssl

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.0.0-rc0
    • Affects Version/s: None
    • Component/s: Networking
    • Labels:
      None
    • Fully Compatible
    • ALL
    • Platforms 2018-05-07

      We disabled opportunistic write for TLS in session_asio when we dropped the implementation in because it didn't work. specifically, we're talking about setting the socket to non-blocking, then doing a write which would block in the tcp send.

      The core of the problem was that asio had no way of forcing the rest of the low level send, because it only had an opportunity to do work when asked to do a write (which worked or not for it's own reasons, generally the size of the openssl buffer being used for encryption). The fix is to expose the unsent buffer in the event of socket failure, and finish the work ourselves with direct calls to write the underlying buffer.

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

              Created:
              Updated:
              Resolved: