MagicStack / MagicStack/asyncpg
Trying to debug `asyncpg.exceptions._base.InterfaceError: cannot perform operation: another operation is in progress`
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- Python
- Estrellas
- 8.1k
- Forks
- 468
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
- asyncpg version: 0.20.1
- PostgreSQL version: 12
- Do you use a PostgreSQL SaaS? If so, which? Can you reproduce
the issue with a local PostgreSQL install?: no - Python version: 3.7.5
- Platform: OS X
- 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
Hi!
I'm trying to debug an issue that I have with errors like asyncpg.exceptions._base.InterfaceError: cannot perform operation: another operation is in progress from this line: https://github.com/MagicStack/asyncpg/blob/dcef29804095990f25178b642b920f3fbcb4ca22/asyncpg/protocol/protocol.pyx#L664
I am trying to understand where I could have gone wrong. So, I would like to ask the following preliminary question:
Suppose my code interacts with asyncpg only through a pool, and only using context managers:
async with pool.acquire() as connection:
...
I also do not share the connection object around. On it, I use the methods fetchrow, fetchval and fetch. They are used sequentially from the same asyncio "thread" (for lack of better word). That is to say, they are never called in parallel.
In this setup, I would think that the error cannot perform operation: another operation is in progress never shows up, but it does. Am I missing something?
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Empieza leyendo asyncpg/protocol/protocol.pyx alrededor de la línea 664 y, a continuación, sigue el contexto de pool.acquire y las llamadas secuenciales a fetchrow, fetchval y fetch descritas en el informe. Intenta reducir el comportamiento a un ejemplo reproducible con asyncio y uvloop. Se considera terminado cuando se haya identificado la operación conflictiva o documentado los detalles de reproducción que faltan para diagnosticarlo.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- postgresql, python
- Área
- backend, databases
- Tipo de issue
- Error
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Necesita aclaración
- Aptitud para principiantes
- 25/100