Skip to content

fix(python/adbc_driver_manager): keep autocommit setting in adbc_clone - #5033

Open
0z5a wants to merge 1 commit into
apache:mainfrom
0z5a:fix/adbc-clone-autocommit
Open

0z5a wants to merge 1 commit into
apache:mainfrom
0z5a:fix/adbc-clone-autocommit

Conversation

@0z5a

@0z5a 0z5a commented Nov 15, 2026

Copy link
Copy Markdown

Connection.adbc_clone() builds the new Connection without passing autocommit, so cloning a connection opened with autocommit=True silently turns autocommit off on the clone. Writes made through the clone are then rolled back when it is closed without an explicit commit(), e.g. when such a connection is used as a pool factory via adbc_clone as in the connection pooling recipe.

The clone now keeps the original's autocommit setting. It also keeps its connection options and backend, so cloning a clone behaves the same.

Closes #5032

This change was drafted with Claude Code (claude-opus-5-5); the test results above are from the runs described.

adbc_clone() built the new Connection without passing autocommit, so a
clone of a connection opened with autocommit=True ran in manual-commit
mode and writes made through it were rolled back when it was closed.
Pass autocommit, the connection options and the backend to the clone.

Assisted-by: Claude Code (claude-opus-5-5)

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

python/adbc_driver_manager: adbc_clone() turns off autocommit, so writes through the clone are lost

1 participant