Add ODBC connection pooling design plan (ADO #47317) - #293
Draft
Saurabh Singh (saurabh500) wants to merge 1 commit into
Draft
Add ODBC connection pooling design plan (ADO #47317)#293Saurabh Singh (saurabh500) wants to merge 1 commit into
Saurabh Singh (saurabh500) wants to merge 1 commit into
Conversation
Design plan for enabling connection pool constructs in mssql-odbc so mssql-python's client-side pool can safely reuse a physical Rust ODBC connection. Covers reset/liveness/isolation semantics, msodbcsql cross-reference, and a 4-stage implementation breakdown. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 63e24621-7665-4572-a5b8-e5dfa55060a0
This was referenced Aug 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Base PR for the mssql-odbc connection pooling effort (ADO #47317). Adds the design plan at
docs/odbc-connection-pooling-plan.md.The plan enables
mssql-python's existing client-side pool to safely reuse a physical Rust ODBC connection — no second pool in Rust; we supply only the ODBC/TDS reset, liveness, transaction, and isolation semantics that make reuse safe.Key findings captured in the doc
msodbcsqlC++ driver (discoveries D1–D9).sp_reset_connectiondoes not reset the transaction isolation level (a SQL Server limitation).mssql-pythonworks around this in PR #343 by re-applyingSET TRANSACTION ISOLATION LEVEL READ COMMITTEDon every checkout — ourSQL_ATTR_TXN_ISOLATIONhandler must honor this and carry the armed reset bit.Implementation stages (tracked as ADO child Tasks of #47317)
SQL_ATTR_CONNECTION_DEAD+SQL_ATTR_RESET_CONNECTION) — [AB#47338]Each stage will land as its own PR stacked on top of this base.
Notes