Confirm that a socket has not been closed and does not have unread data at checkout

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Won't Fix
    • Priority: Major - P3
    • 2.3.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Because Ruby can allow threads to be killed explicitly by an application, it's possible that a socket can be written to and then never read from before being returned to the pool. It is therefore possible for a socket to be checked out and then read a killed thread's data.

      Python uses poll or select to check that a socket has not been closed and also checks for unread data. We should do the same.

      Here is the relevant Python code:

      https://github.com/mongodb/mongo-python-driver/blob/master/pymongo/network.py#L169-L182

      https://github.com/mongodb/mongo-python-driver/blob/master/pymongo/pool.py#L654-L677

              Assignee:
              Unassigned
              Reporter:
              Emily Stolfo (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: