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

When client is closed, fail operations with appropriate exception

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Unknown Unknown
    • None
    • Affects Version/s: None
    • Component/s: None
    • None

      Historically Ruby driver would permit a client to be used even if the client was closed (i.e. Client#close was called). The close would stop monitoring but wouldn't alter server state, thus for as long as the servers remained not unknown the client would still be usable for operations.

      https://jira.mongodb.org/browse/RUBY-2441 requires that a cleared pool (which is what client closing does) is unusable, which in turn makes the client also unusable.

      Currently application attempting to use a closed client for operations would receive one of several exceptions depending on the exact internal state of the client: server selection could fail if servers were marked unknown, otherwise pool closed error can be raised.

      This ticket is for creating an exception specifically for the condition of the client being closed, and raising it consistently when an operation is attempted on a closed client.

            Assignee:
            Unassigned Unassigned
            Reporter:
            oleg.pudeyev@mongodb.com Oleg Pudeyev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: