Skip to content

Commit 5038dc2

Browse files
Address preview3 release note review feedback
- Connection Pool V2: "closer to parity" -> "to parity" (#4565 review, @mdaigle) - Connection Pool V2: "emancipated" -> "leaked" connections, matching the terminology being adopted in the code (#4565 review, @mdaigle) - Async key store provider APIs: remove the implication that these remove blocking key-store I/O from async query execution. The driver's own SqlSecurityUtility path still calls the synchronous provider methods on both sync and async command paths, so the async overrides are only effective for callers invoking a provider directly. Same correction applied to the AzureKeyVaultProvider note. (#4565 review, @cheenamalhotra) Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
1 parent 1f7347f commit 5038dc2

3 files changed

Lines changed: 7 additions & 5 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ See the [full release notes](release-notes/7.1/7.1.0-preview3.md) for detailed d
3333
- Implemented those four asynchronous APIs in `SqlColumnEncryptionAzureKeyVaultProvider`, calling the Azure SDK's own asynchronous methods and flowing the supplied `CancellationToken`. Concurrent cache misses for the same key are gated so a burst of callers issues a single Key Vault request. See the [AKV release notes](release-notes/add-ons/AzureKeyVaultProvider/7.1/7.1.0-preview3.md) for the `VerifyColumnMasterKeyMetadata` signature-validation behavior change and the 7.1 runtime requirement.
3434
([#4540](https://github.com/dotnet/SqlClient/pull/4540))
3535

36-
- Substantially expanded `ChannelDbConnectionPool` (the opt-in pool behind `Switch.Microsoft.Data.SqlClient.UseConnectionPoolV2`) toward parity with the default pool: transaction support, broken-connection replacement, leaked-connection reclamation, background warmup and replenishment to `Min Pool Size`, idle pruning driven by `Connection Idle Timeout`, optional connection-creation rate limiting, and metrics/tracing parity. Default pooling behavior is unchanged.
36+
- Substantially expanded `ChannelDbConnectionPool` (the opt-in pool behind `Switch.Microsoft.Data.SqlClient.UseConnectionPoolV2`) to parity with the default pool: transaction support, broken-connection replacement, leaked-connection reclamation, background warmup and replenishment to `Min Pool Size`, idle pruning driven by `Connection Idle Timeout`, optional connection-creation rate limiting, and metrics/tracing parity. Default pooling behavior is unchanged.
3737
([#4395](https://github.com/dotnet/SqlClient/pull/4395),
3838
[#4396](https://github.com/dotnet/SqlClient/pull/4396),
3939
[#4429](https://github.com/dotnet/SqlClient/pull/4429),

‎release-notes/7.1/7.1.0-preview3.md‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,24 +29,25 @@ This update brings the following changes since the [7.1.0-preview2](7.1.0-previe
2929

3030
*Who Benefits:*
3131

32-
- Authors of custom column encryption key store providers — particularly those backed by network-bound key stores such as HSMs or cloud key vaults — can now implement genuinely asynchronous key operations instead of blocking a thread on synchronous I/O during query execution.
32+
- Authors of custom column encryption key store providers — particularly those backed by network-bound key stores such as HSMs or cloud key vaults — can now implement genuinely asynchronous key operations, and callers that resolve column encryption keys directly through a provider can await them instead of blocking a thread on synchronous I/O.
3333

3434
*Impact:*
3535

3636
- Purely additive. Because the new methods are `virtual` with a synchronous fallback, existing providers compile and run without modification.
37+
- **The driver does not yet call these methods.** The driver's own column encryption key resolution path (`SqlSecurityUtility`) still invokes the synchronous provider methods on both the synchronous and asynchronous command paths, so overriding the asynchronous methods does not by itself remove blocking key-store I/O from `ExecuteReaderAsync` and friends. Wiring the driver's async paths through to these APIs is tracked as follow-up work.
3738
- The in-box `SqlColumnEncryptionAzureKeyVaultProvider` overrides all four methods in this release. See the [AzureKeyVaultProvider 7.1.0-preview3](../add-ons/AzureKeyVaultProvider/7.1/7.1.0-preview3.md) release notes. ([#4540](https://github.com/dotnet/SqlClient/pull/4540))
3839

3940
#### Connection Pool V2 Feature Completeness
4041

4142
*What Changed:*
4243

43-
- Substantially expanded `ChannelDbConnectionPool`, the opt-in pool implementation gated behind the `Switch.Microsoft.Data.SqlClient.UseConnectionPoolV2` AppContext switch, bringing it closer to parity with the default `WaitHandleDbConnectionPool`:
44+
- Substantially expanded `ChannelDbConnectionPool`, the opt-in pool implementation gated behind the `Switch.Microsoft.Data.SqlClient.UseConnectionPoolV2` AppContext switch, bringing it to parity with the default `WaitHandleDbConnectionPool`:
4445
- **Transaction support** — implemented `PutObjectFromTransactedPool` and `TransactionEnded` (previously `NotImplementedException`), and reworked connection return to mirror the reference pool's deactivate-then-route behavior. ([#4487](https://github.com/dotnet/SqlClient/pull/4487))
4546
- **Connection replacement** — implemented replacement of broken connections during command execution, with atomic slot replacement in `ConnectionPoolSlots`. ([#4429](https://github.com/dotnet/SqlClient/pull/4429))
4647
- **Background warmup and replenishment** — the pool now pre-creates connections up to `Min Pool Size` on startup and replenishes automatically whenever it drops below the minimum. ([#4452](https://github.com/dotnet/SqlClient/pull/4452))
4748
- **Idle pruning** — the pruning window is now derived from the `Connection Idle Timeout` value rather than a hard-coded interval. Defaults are unchanged. ([#4463](https://github.com/dotnet/SqlClient/pull/4463))
4849
- **Connection-creation rate limiting** — an optional `ConcurrencyLimiter` can throttle new physical connection creation; when a permit is denied the caller waits for an existing connection instead of forcing another open. ([#4395](https://github.com/dotnet/SqlClient/pull/4395), [#4396](https://github.com/dotnet/SqlClient/pull/4396))
49-
- **Leaked connection reclamation** — the pool now reclaims emancipated connections (connections whose owning `SqlConnection` was garbage collected without being closed) both inline on the requesting thread and, while callers are waiting, from a demand-driven `PoolReclaimer` timer. The `number-of-reclaimed-connections` counter, which previously always read zero under pool V2, is now emitted. ([#4529](https://github.com/dotnet/SqlClient/pull/4529))
50+
- **Leaked connection reclamation** — the pool now reclaims leaked connections (connections whose owning `SqlConnection` was garbage collected without being closed) both inline on the requesting thread and, while callers are waiting, from a demand-driven `PoolReclaimer` timer. The `number-of-reclaimed-connections` counter, which previously always read zero under pool V2, is now emitted. ([#4529](https://github.com/dotnet/SqlClient/pull/4529))
5051
- **Metrics and tracing parity** — the pool now emits the same pooled/free connection and soft/hard connect/disconnect counters as the default pool, and traces at comparable fidelity. ([#4504](https://github.com/dotnet/SqlClient/pull/4504))
5152

5253
*Who Benefits:*

‎release-notes/add-ons/AzureKeyVaultProvider/7.1/7.1.0-preview3.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,12 @@ See the core [Microsoft.Data.SqlClient 7.1.0-preview3](../../../7.1/7.1.0-previe
2020

2121
*Who Benefits:*
2222

23-
- Applications using Always Encrypted with Azure Key Vault can now perform column encryption key operations without blocking a thread pool thread on network-bound key vault I/O.
23+
- Applications using Always Encrypted with Azure Key Vault can await column encryption key operations rather than blocking a thread pool thread on network-bound key vault I/O, when they call the provider directly.
2424

2525
*Impact:*
2626

2727
- No public API was removed or changed. The column encryption key and signature caches are shared between the synchronous and asynchronous paths, so a key resolved by one is visible to the other.
28+
- **The driver does not yet call the asynchronous methods.** `Microsoft.Data.SqlClient`'s own key resolution path still invokes the synchronous provider methods on both synchronous and asynchronous command execution, so these overrides do not by themselves make Always Encrypted query execution non-blocking. See the core [7.1.0-preview3](../../../7.1/7.1.0-preview3.md) release notes.
2829
- **Behavior change:** `VerifyColumnMasterKeyMetadata` and `VerifyColumnMasterKeyMetadataAsync` now reject a null or empty `signature` with `ArgumentNullException` / `ArgumentException` instead of passing it through to the Azure SDK. In-product callers are unaffected because `SqlSecurityUtility.VerifyColumnMasterKeySignature` already rejects those values upstream.
2930
- **Runtime requirement:** this version requires `Microsoft.Data.SqlClient` 7.1.0-preview3 or later at runtime, because the overridden methods only exist on the 7.1 base class. The NuGet dependency floor covers restore, but downgrading the driver below 7.1 at runtime produces a `TypeLoadException`, since assembly versions unify at `major.0.0.0`.
3031

0 commit comments

Comments
 (0)