Uploaded image for project: 'Ruby Driver'
  1. Ruby Driver
  2. RUBY-1118

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

    • Type: Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • 2.3.0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      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 Unassigned
            Reporter:
            emily.stolfo Emily Stolfo
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: