apache / apache/arrow-adbc

go/adbc/driver/flightsql: long delay between createPreparedStatement and getFlightInfoPreparedStatement

Open
#2,040 14 comments 0 reactions 0 assignees View on GitHub
Type: bug
Dominant language
C#
Stars
627
Forks
217
Avg merge
17h
Merged PRs (30d)
57

Description

### What happened?

We have a Python API that uses the ADBC driver to execute queries against our Java Arrow Flight SQL server. The Python server uses FastAPI + Strawberry, and when we receive a request to execute a query, we spin up a background thread to handle the execution against the AFS server. Multiple threads on the same pod could be executing queries against the AFS server at any given moment.

We recently noticed some issues with hanging queries, and when looking at our DataDog traces, we notice that there is almost a 30 minute difference between the `createPreparedStatement` request and the `getFlightInfoPreparedStatement` request.

My initial guess is that this could be related to having multiple requests at the same time through the ADBC driver, but I don't have enough context about how the bindings between Go and Python work.

Is there anything that jumps out at you? Is there anything we could do to help debug this? Here's pictures of the traces:

![Screenshot 2024-07-25 at 2 53 31 PM](https://github.com/user-attachments/assets/690bb99e-8a6a-484d-8a68-5b9fbfed1012)
![Screenshot 2024-07-25 at 2 53 09 PM](https://github.com/user-attachments/assets/c8cbb194-8f3d-4c5e-a0f0-84d2d4016f49)

### Stack Trace

_No response_

### How can we reproduce the bug?

_No response_

### Environment/Setup

Python 3.12
ADBC FlightSQL driver 1.0.0
ADBC driver manager 1.0.0

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.