MagicStack / MagicStack/asyncpg
Implementation of shared mode connection pool.
未关闭
还没有人认领这个 Issue。
- 主要语言
- Python
- 星标
- 8.1k
- 派生
- 468
- PR 合并指标
- 30 天内没有已合并 PR
描述
- asyncpg version: 0.21.0
- PostgreSQL version: 12.4
- Do you use a PostgreSQL SaaS? If so, which? Can you reproduce
the issue with a local PostgreSQL install?: no - Python version: 3.8.3
- Platform: Linux 4.18.0-193.19.1.el8_2.x86_64
- Do you use pgbouncer?: no
- Did you install asyncpg with pip?: yes
- If you built asyncpg locally, which version of Cython did you use?:
- Can the issue be reproduced under both asyncio and
uvloop?: yes
Currently, asyncpg implements connection pool by blocking the acquired connection in an asyncio.LifoQueue. In aioredis, the connection pool uses so-called shared mode connection which sends the command directly to the connection's StreamWriter and awaits the result from a background asyncio.Future consuming results from StreamReader indefinitely. Is it possible to implement a similar connection pool to optimize the performance of query?
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
该 issue 将 asyncpg 的连接池和 aioredis 的连接池实现列为起点,但没有提供文件或测试。先阅读这两种池设计,然后确定应如何衡量查询性能和并发命令处理;完成工作需要一个达成共识的共享模式设计、实现范围以及性能证据。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- postgresql, python
- 领域
- databases
- Issue 类型
- 功能
- 难度
- 5/5
- 预计耗时
- 一周以上
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 25/100