long2ice / asynch

An asyncio ClickHouse Python Driver with native (TCP) interface support.
https://github.com/long2ice/asynch
Apache License 2.0
180 stars 42 forks source link

Connection pool initialization #68

Open AlexEbral opened 1 year ago

AlexEbral commented 1 year ago

In initialize function there is condition while self.size < self.minsize: where self.size is self.freesize + len(self._used) and this leads to the fact that there will never be more than minsize connections in the dequeue, and maxsize connections count never be reached. May be there should be condition like this: while self.freesize < self.minsize: ?

ali-bahjati commented 1 year ago

I confirm that the maxsize is never reached.

gnomeby commented 6 months ago

Fix here: https://github.com/long2ice/asynch/pull/97