tarantool / go-tarantool

Tarantool 1.10+ client for Go language
https://pkg.go.dev/github.com/tarantool/go-tarantool/v2
BSD 2-Clause "Simplified" License
180 stars 57 forks source link

pool: improve pool.Connect logic #372

Closed oleg-jukovec closed 7 months ago

oleg-jukovec commented 7 months ago

The current pool.Connect logic:

  1. Pool will use only endpoints available at the call moment.
  2. If there are no available endpoints then a pool will not be created.

We need to rework this two moments:

  1. Some endpoints may gone forever from a client point of view. We could avoid it and try to reconnect to unavailable endpoints in a background (as it already done if an endpoint became available).
  2. We could create/use (with an error) an empty pool since we have Add and Remove methods. So from the API point of view it would be nice to have an ability to create a pool object and add instances later.