Warning with simple client calling list_flights and do_get
- Dominant language
- C++
- Stars
- 17.1k
- Forks
- 4.3k
- Avg merge
- 3d 13h
- Merged PRs (30d)
- 88
Description
### Describe the bug, including details regarding any error messages, version, and platform.
### Warning message
```
/Users/voltrondata/github-actions-runner/_work/crossbow/crossbow/arrow/cpp/src/arrow/status.cc:152: Invalid: Signal stop source already set up
```
Pyarrow 13.0.0 on MacOS.
```
$ pip3 list
Package Version
---------- -------
numpy 1.26.0
pip 23.2.1
pyarrow 13.0.0
setuptools 68.2.0
wheel 0.41.2
```
Was able to reproduce with the [example server](https://github.com/apache/arrow/blob/main/python/examples/flight/server.py) by adding some CSV data using the example client. Then I used a different client (below)
Can you help me understand if this is a bug or misuse of the api? Thank you!
### No warning
```
import pyarrow.flight as flight
print("-- Working Start")
client = flight.FlightClient('grpc://127.0.0.1:5005')
ticket = next(client.list_flights()).endpoints[0].ticket
reader = client.do_get(ticket)
table = reader.read_all()
```
### Warning present (only difference is `list_flights()` is called outside of `next(...)`)
```
import pyarrow.flight as flight
print("-- Not working, list_flights -> next ")
client = flight.FlightClient('grpc://127.0.0.1:5005')
flights = client.list_flights()
ticket = next(flights).endpoints[0].ticket
reader = client.do_get(ticket)
table = reader.read_all()
```
### Warning present (consuming all endpoints in all the flights)
```
import pyarrow.flight as flight
print("-- Not working, for loop list_flights -> do_get ")
client = flight.FlightClient('grpc://127.0.0.1:5005')
for f in client.list_flights():
endpoints = f.endpoints
for endpoint in endpoints:
ticket = endpoint.ticket
flightStreamReader = client.do_get(ticket)
table = flightStreamReader.read_all()
```
### Component(s)
FlightRPC, Python
Contributor guide
Assessment
This issue has not been assessed yet.