Bad connections pool implemetation
I've found multiple problems with current pool implementation:
- Pool is blocking. There is no async initialization which leads to next problems,
- There is no way to set minimum number of connections that are created at pool initialization.
- Instead of asyncronously blocking until connection is available, pool will raise exception:
https://github.com/NoneGG/aredis/blob/cec3cdabe67f45493ac413737d8579f46c27fded/aredis/pool.py#L225-L226
This makes any command invocation unsafe and requires user to do error handling. Current behaviour could be preserved with option though.
Addressing these issues will mean making backwards-incompatible changes (making
get_connectionasync at least).
Some examples of pool implementations that could be referenced:
- https://github.com/MagicStack/asyncpg/blob/master/asyncpg/pool.py
- https://github.com/aio-libs/aioredis/blob/master/aioredis/pool.py
Thats affects me, too. It's very disappointing.
I emailed @NoneGG asking about a possibility of releasing 2.0.0 with a few breaking changes addressing pool implementation and other issues
I emailed @NoneGG asking about a possibility of releasing 2.0.0 with a few breaking changes addressing pool implementation and other issues
May I know when version 2.0.0 is released?
May I know when version 2.0.0 is released?
I haven't got a response from maintainer yet, there haven't been any work on 2.0.0 so far.
Thanks for your efforts @Fogapod. I think there will be many new users here, since aioredis seems to have been abandoned. Let's hope this project can become a good replacement.
@Fogapod Aren't responses from the maintainer yet?
I really want to use aredis on my big projects.
@drgarcia1986 unfortunately, no. And I don't think I have time to work on aredis at this point.
@Fogapod maybe if @NoneGG add more maintainers, we can work together to fix bugs and rethink the connection pool design
We just hit this in production too:
https://gitlab.com/fluidattacks/product/-/issues/3874
I'm willing to contribute a patch, but I'll need a hand with the desired interface/implementation, at least a skeleton or a few words. This in order to keep the library useful to the most people as possible and not break too much compatibility