Repository navigation
fix: clear the transaction flag when COMMIT or ROLLBACK fails - #6249
adityaanikam wants to merge 1 commit into
Conversation
Signed-off-by: adityaanikam <adityanikam9502@gmail.com>
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Description
Fixes #6248.
commit()androllback()on the connection pools cleared the "transaction active" flag only after the database call succeeded. WhenCOMMITfailed (Redshift's serializable isolation violation in the issue), the flag stayed set, so every laterEngineAdapter.transaction()on that thread skippedBEGINandCOMMITand its writes were never committed.The flag is now cleared in a
finallyin both pool classes, forcommit()and forrollback(), which has the same shape.Test Plan
Added
test_connection_pool_failed_commit_or_rollback_ends_transactionfor the three pool classes. Six of its cases fail without the change. I also rantests/core/engine_adapter/test_base.pytogether withtests/utils/test_connection_pool.py(136 passed) andruff check/ruff format --checkon the two files.Checklist
make styleand fixed any issuesmake fast-test)git commit -s) per the DCOSummary by CodeRabbit