-
Notifications
You must be signed in to change notification settings - Fork 311
New pool scaffolding #3352
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
mdaigle
merged 19 commits into
dotnet:main
from
mdaigle:dev/mdaigle/new-pool-scaffolding
May 22, 2025
Merged
New pool scaffolding #3352
Changes from 6 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
df8dcb7
Add app context switch
mdaigle 971e0c0
Add ChannelDbConnectionPool shim and instantiate in pool group based …
mdaigle e112110
Clean up connection pool interface. Rename TaskCompletionSource param…
mdaigle 60e94ec
Cleanup
mdaigle f8aee85
Fix app context switch evaluation.
mdaigle b8fde3e
Add license statement and class summary
mdaigle 256f558
Change DbConnection pool from abstract to interface.
mdaigle 393f175
Add doc comments. Refactor params for consistency.
mdaigle 540e93f
Add unit test for context switch default value.
mdaigle 4bebb1b
Merge main
mdaigle a424037
Add class summary for WaitHandleDbConnectionPool
mdaigle d0ca337
Rename ObjectId property to Id.
mdaigle 6067bd1
Fix reflection of pool count.
mdaigle aac03ad
Fix binding flags.
mdaigle b799f10
Fix property ordering. Inherit doc comments.
mdaigle 6ea1491
Defer new pool class to next PR. Add test to boost code coverage.
mdaigle 32b31e5
Try to fix app context switch setting.
mdaigle d6b8eb5
Remove flaky test. Planned to replace this in the near future anyways.
mdaigle 831dc5b
Clean up test file.
mdaigle File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
84 changes: 84 additions & 0 deletions
84
...oft.Data.SqlClient/src/Microsoft/Data/SqlClient/ConnectionPool/ChannelDbConnectionPool.cs
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
// See the LICENSE file in the project root for more information. | ||
using System; | ||
using System.Collections.Concurrent; | ||
using System.Data.Common; | ||
using System.Threading.Tasks; | ||
using System.Transactions; | ||
using Microsoft.Data.Common; | ||
using Microsoft.Data.ProviderBase; | ||
|
||
#nullable enable | ||
|
||
namespace Microsoft.Data.SqlClient.ConnectionPool | ||
{ | ||
/// <summary> | ||
/// A connection pool implementation based on the channel data structure. | ||
/// Provides methods to manage the pool of connections, including acquiring and releasing connections. | ||
/// </summary> | ||
internal sealed class ChannelDbConnectionPool : DbConnectionPool | ||
{ | ||
internal override int Count => throw new NotImplementedException(); | ||
|
||
internal override DbConnectionFactory ConnectionFactory => throw new NotImplementedException(); | ||
|
||
internal override bool ErrorOccurred => throw new NotImplementedException(); | ||
|
||
internal override TimeSpan LoadBalanceTimeout => throw new NotImplementedException(); | ||
|
||
internal override DbConnectionPoolIdentity Identity => throw new NotImplementedException(); | ||
|
||
internal override bool IsRunning => throw new NotImplementedException(); | ||
|
||
internal override DbConnectionPoolGroup PoolGroup => throw new NotImplementedException(); | ||
|
||
internal override DbConnectionPoolGroupOptions PoolGroupOptions => throw new NotImplementedException(); | ||
|
||
internal override DbConnectionPoolProviderInfo ProviderInfo => throw new NotImplementedException(); | ||
|
||
internal override ConcurrentDictionary<DbConnectionPoolAuthenticationContextKey, DbConnectionPoolAuthenticationContext> AuthenticationContexts => throw new NotImplementedException(); | ||
|
||
internal override bool UseLoadBalancing => throw new NotImplementedException(); | ||
|
||
internal override void Clear() | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
internal override void PutObjectFromTransactedPool(DbConnectionInternal obj) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
internal override DbConnectionInternal ReplaceConnection(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
internal override void ReturnInternalConnection(DbConnectionInternal obj, object owningObject) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
internal override void Shutdown() | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
internal override void Startup() | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
internal override void TransactionEnded(Transaction transaction, DbConnectionInternal transactedObject) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
internal override bool TryGetConnection(DbConnection owningObject, TaskCompletionSource<DbConnectionInternal> retry, DbConnectionOptions userOptions, out DbConnectionInternal connection) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
} | ||
} |
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
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.