Uploaded image for project: 'Motor'
  1. Motor
  2. MOTOR-96

"Future exception was never retrieved" warning after socket timeout

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 0.5
    • Affects Version/s: 0.5
    • Component/s: tornado
    • None

      Glitch in unreleased code: a timeout from a Tornado socket throws socket.error into PyMongo, which calls socket.close, which Motor delegates to Tornado's IOStream.close. Motor still has an unresolved Future from IOStream.read_bytes which is now in an error state, but the greenlet that was going to await this Future has terminated.

      Recent versions of Tornado log a warning when this Future is garbage collected, "Future exception was never retrieved."

      Motor's socket code should retrieve the IOStream.read_bytes Future's exception on timeout.

            Assignee:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Reporter:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: