Commit 22b233b
authored
Get/Return pooled connections (#3404)
* Add get flow and basic tests.
* Add tests. Clean up diff.
* Add additional tests. Refactor to test error behavior.
* Implement return flow and add return/reuse tests.
* Clean up comments and todos.
* Add test cases.
* Enable init property accessor in netfx.
* Switch to auto properties.
* Reorder class members.
* Address review comments.
* Fix channels package resolution.
* Review changes.
* Set CreateTime in constructor. This makes sense becuase CreateTime cannot be modified and should be set regardless of pooling status.
* Naming
* Fix potential connection leak when setting TaskCompletionSource result.
* Fix package reference for central package management.
* Fix formatting. Refactor get connection loop.
* Move concurrent data structures out to dedicated class.
* Refactor data structure to remove generics, revert to previous logic.
* Cleanup
* Fix timeout exception handling for async path.
* Review comments. Fix merge conflict.
* Change object reference to full type. Fix tab.
* cleanup
* Add link to github issue for async pathways.
* Remove side effects from IsLiveConnection. Fix exception handling and connection disposal when opening new connection.
* Minor review feedback. Make tests more reliable.
* Fix compilation
* Make reservation disposable.
* Fix tests
* Make async request order test more reliable.
* Avoid confusing double reservation release. Use params in callbacks to avoid closures.
* Doc comment cleanup. Add unit tests for ConnectionPoolSlots.
* Fix up tests
* Clean up unit test proj file.
* Make disposal safer. Clean up exception documentation.
* Improve tests.
* Clean up wrapped exceptions. Fix param nullability.
* Clean up tests based on new editorconfig settings.
* Review changes.
* Fix tests to expect unwrapped exception.1 parent c68da22 commit 22b233b
File tree
18 files changed
+2020
-97
lines changed- src
- Microsoft.Data.SqlClient
- netcore
- ref
- src
- netfx
- ref
- src
- src
- Microsoft/Data
- ProviderBase
- SqlClient
- ConnectionPool
- System/Runtime/CompilerServices
- tests/UnitTests/Microsoft/Data/SqlClient/ConnectionPool
- tools/specs
18 files changed
+2020
-97
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| 103 | + | |
103 | 104 | | |
104 | 105 | | |
105 | 106 | | |
| |||
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
49 | 54 | | |
50 | 55 | | |
51 | 56 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
111 | 114 | | |
112 | 115 | | |
113 | 116 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| 51 | + | |
51 | 52 | | |
52 | 53 | | |
53 | 54 | | |
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
300 | 300 | | |
301 | 301 | | |
302 | 302 | | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
303 | 306 | | |
304 | 307 | | |
305 | 308 | | |
| |||
1058 | 1061 | | |
1059 | 1062 | | |
1060 | 1063 | | |
| 1064 | + | |
1061 | 1065 | | |
1062 | 1066 | | |
1063 | 1067 | | |
| |||
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
| 30 | + | |
30 | 31 | | |
Lines changed: 8 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | 49 | | |
55 | 50 | | |
56 | 51 | | |
| |||
93 | 88 | | |
94 | 89 | | |
95 | 90 | | |
| 91 | + | |
96 | 92 | | |
97 | 93 | | |
98 | 94 | | |
99 | 95 | | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
100 | 101 | | |
101 | 102 | | |
102 | 103 | | |
| |||
542 | 543 | | |
543 | 544 | | |
544 | 545 | | |
545 | | - | |
| 546 | + | |
546 | 547 | | |
547 | 548 | | |
548 | 549 | | |
| |||
712 | 713 | | |
713 | 714 | | |
714 | 715 | | |
715 | | - | |
716 | 716 | | |
717 | 717 | | |
718 | 718 | | |
| |||
767 | 767 | | |
768 | 768 | | |
769 | 769 | | |
770 | | - | |
| 770 | + | |
771 | 771 | | |
772 | 772 | | |
773 | 773 | | |
| |||
0 commit comments