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

    XMLWordPrintable

    Details

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

      Description

      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

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              emily.stolfo Emily Stolfo
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: