aio-libs / aio-libs/aiopg

Cursor timeout should not match connection timeout

未關閉
#670 0 則留言 2 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
Python
星號
1.4k
分支
170
PR 合併指標
30 天內沒有已合併 PR

描述

It appears that the cursor timeout, when set to None, will always take the connection timeout as the maximum amount of time a query can run.

I believe this is a bug and should be changed.

https://github.com/aio-libs/aiopg/blob/master/aiopg/connection.py#L260

If this is not a bug and the intended behavior, it is very opinionated and should be documented.

A connection timeout is for establishing a connection to the database and it is very possible to have long running queries that exceed the connection timeout.

At the very least, I would like a way to disable the cursor timeout all together, but it appears that is not possible.

貢獻指南

開啟貢獻指南

研究方向

Start at aiopg/connection.py around line 260 and trace how a cursor timeout of None is derived from the connection timeout. Reproduce the behavior with a long-running PostgreSQL query, then verify that the completed change either separates the timeouts or clearly documents the intended behavior and provides a way to disable cursor timeouts.

由索引模型根據 Issue 內容生成。

評估

技術堆疊
postgresql, python
領域
databases
Issue 類型
缺陷
難度
3/5
預估耗時
1-2 天
活躍度
停滯
描述清晰度
基本清楚
新手友好度
38/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。