You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Replace internal connection pool state enum with a boolean #4795
Is your feature request related to a problem? Please describe.
The pool shutdown work in #4302 deferred a follow-up to simplify internal connection pool state tracking. The discussion concluded that the pools need to distinguish running from not running, rather than introduce additional lifecycle states.
The current enum-based representation also encourages checks and log messages that assume "not running" specifically means "shutting down."
Describe the solution you'd like
Replace the internal connection pool state enum with a boolean running flag, consistently across ChannelDbConnectionPool and WaitHandleDbConnectionPool.
Update initialization, startup, shutdown, and state checks to use the boolean consistently.
Preserve existing concurrency guarantees and shutdown behavior, including idempotency and the rule that a shut-down pool is not resurrected.
Update associated comments and diagnostics to describe running/not-running accurately.
Add or update tests covering both pool implementations, including synchronous and asynchronous acquisition during shutdown.
This is an internal implementation change; it must not change the public SqlConnection.State API or the System.Data.ConnectionState enum.
Describe alternatives you've considered
Retain an enum and introduce explicit lifecycle states such as Created, Starting, Started, Stopping, and Stopped. This was discussed in #4302, but the follow-up direction was to use a boolean without introducing new states.
Proposes replacing the internal pool state enum with a boolean "running" flag in ChannelDbConnectionPool and WaitHandleDbConnectionPool, following the #4302 shutdown work. It is an internal refactor with no public API change, but it touches concurrency-sensitive shutdown paths. Severity: P3.
A maintainer should confirm scope. Then assign this to Copilot coding agent to replace the state enum with a boolean in both pool implementations. It should preserve idempotent shutdown and the rule that a shut-down pool is never resurrected. It should also update comments and logs to say "not running" instead of "shutting down", and add sync and async acquisition-during-shutdown tests for both pools.
Note: This triage summary is auto-generated by an AI agent. The analysis and suggestions above have not been verified by a human maintainer. Please treat as preliminary guidance only.
Activity
github-actions commentedon Oct 6, 2026
🔍 Triage Summary
Analysis
Proposes replacing the internal pool state enum with a boolean "running" flag in
ChannelDbConnectionPoolandWaitHandleDbConnectionPool, following the #4302 shutdown work. It is an internal refactor with no public API change, but it touches concurrency-sensitive shutdown paths. Severity: P3.Next Steps