MagicStack / MagicStack/asyncpg

Disconnection from postgres-compatible google cloud AlloyDB instance hangs

オープン
#962 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
Python
スター
8.1k
フォーク
469
平均マージ
18分
マージ済み PR(30日)
4

説明

  • asyncpg version: 0.26.0
  • PostgreSQL version: Google AlloyDB, postgres 14.4 compatible
  • Do you use a PostgreSQL SaaS? If so, which? Can you reproduce
    the issue with a local PostgreSQL install?
    : I cannot reproduce the issue on a local postgres, no.
  • Python version: 3.10
  • Platform: Macos
  • Do you use pgbouncer?: No
  • Did you install asyncpg with pip?: Yes
  • If you built asyncpg locally, which version of Cython did you use?: NA
  • Can the issue be reproduced under both asyncio and
    uvloop?
    : I have not tried to reproduce under uvloop

I am connecting to an AlloyDB instance on Google Cloud (currently, these are available for free testing). I can connect and queries run as expected. However, connection.disconnect() hangs. I cannot reproduce this behavior locally; disconnection happens as expected. Synchronous database work with psycopg2, for example, works as expected.

This code reproduces the behavior I am seeing (running through the alloydb-auth-proxy as is required):

import asyncpg
conn = await asyncpg.connect(ALLOYDB_URI)
conn.disconnect() # hangs

I'll put in a ticket with Google as well if nothing obvious turns up here.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

提供された AlloyDB-auth-proxy の再現コードにある connection.disconnect() の呼び出しから始め、報告された Google Cloud AlloyDB のセットアップに対して実行します。動作をローカルの PostgreSQL インストールおよび既存の psycopg2 の動作と比較します。ハングの原因を特定し、このセットアップで asyncpg が正常に切断されれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
gcp, postgresql, python
領域
cloud, databases
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。