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

XMLWordPrintableJSON

    • Server Programmability
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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.

            Assignee:
            Unassigned
            Reporter:
            Esha Maharishi (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: