Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-27660

remove ConnectionPool class (only used by BackgroundSync to get a DBClientConnection)

    XMLWordPrintableJSON

Details

    • Service Arch

    Description

      The ConnectionPool class is only used in a lambda by BackgroundSync rollback, and all the lambda does is get the underlying DBClientConnection.

      The lambda is stored in RollbackSourceImpl and called to get the DBClientConnection to run some simple commands (here, here, here, and here).

      It seems unnecessary to have an entire connection pool (and ConnectionPool class to manage it) just to occasionally (for rollback) get a DBClientConnection to run a few commands.

      Perhaps it would be more straightforward to just give RollbackSourceImpl a unique_ptr<DBClientConnection> the way ConnectionPool::acquireConnection() internally does. This is especially true since ConnectionPool is always created with a nullptr NetworkConnectionHook anyway (the other constructor is only called by this constructor).

      Possibly neweng.

      Attachments

        Activity

          People

            backlog-server-servicearch Backlog - Service Architecture
            esha.maharishi@mongodb.com Esha Maharishi (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated: