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

Disconnecting connection pool should not reconnect connections

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 2.8.0.rc0
    • Affects Version/s: None
    • Component/s: Connections
    • None

      One of the changes in RUBY-1319 was calling disconnect! on a connection pool reconnected up to min pool size sockets. The only requirement in https://github.com/mongodb/specifications/commit/64ddab6b40e78aed2f7d2134195c04e382837eb3 was that the existing non-monitoring sockets were disconnected on auth failure; reconnecting up to min pool size is an optimization that is not mandated by the spec which probably doesn't make sense since an auth error means reconnecting probably won't even work. Furthermore, due to https://jira.mongodb.org/browse/RUBY-1605 we do not always connect min pool size # of sockets; having disconnect create new network connections when we normally delay network i/o until an operation is performed is inconsistent and can be done without. The disconnects also caused problems for cmap implementation in 1560.

      Therefore, to streamline the connection pool implementation and reduce issue surface, when a connection pool is told to disconnect it should close all of its connections and do not reconnect any of them.

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

              Created:
              Updated:
              Resolved: