jverhoeks opened a new issue, #5027:
URL: https://github.com/apache/arrow-adbc/issues/5027
### What happened?
With autocommit disabled, bulk ingest through the Go Flight SQL driver runs
outside the open transaction. `executeIngest` builds the
`CommandStatementIngest` without a `transaction_id`, while every other execute
path on the connection (`Execute`, `ExecuteUpdate`, `Prepare`, Substrait)
routes through the `flightsql.Txn` and carries its id.
A server that honours `CommandStatementIngest.transaction_id` therefore
commits the ingested rows at once. `rollback()` does not undo them, and they
are visible to other sessions before `commit()`.
### How can we reproduce the bug?
```python
import adbc_driver_flightsql.dbapi as flight_sql
import pyarrow as pa
conn = flight_sql.connect("grpc://localhost:50051") # autocommit off by
default
with conn.cursor() as cur:
cur.adbc_ingest("t", pa.table({"id": [1, 2]}), mode="append")
conn.rollback()
# rows 1 and 2 are still in t
```
On the wire, the `DoPut` descriptor's `CommandStatementIngest` has an empty
`transaction_id` even though `ActionBeginTransactionRequest` was sent and
answered.
### Environment/Setup
Go Flight SQL driver at main (also release 22), arrow-go v18.8.0.
`flightsql.Txn` in arrow-go has no ingest method, but `ExecuteIngestOpts` is
the `CommandStatementIngest` message, so the driver can set `TransactionId`
from `txn.ID()`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]