Commit 75345b1
authored
fix: session pool should only create session if pending<=waiters (#791)
* fix: session pool should only create session if pending<=waiters
The session pool would always initiate the creation of a new session
if one was not available at the moment that an application requested
a session, even when a large number of sessions were already pending
creation. This could cause the pool to create more sessions than
necessary for an application.
Fixes #790.
* fix: add clarifying comment1 parent 42fdc15 commit 75345b1
2 files changed
+38
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
235 | 235 | | |
236 | 236 | | |
237 | 237 | | |
| 238 | + | |
| 239 | + | |
238 | 240 | | |
239 | 241 | | |
240 | 242 | | |
| |||
459 | 461 | | |
460 | 462 | | |
461 | 463 | | |
| 464 | + | |
462 | 465 | | |
463 | 466 | | |
464 | | - | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
465 | 471 | | |
466 | 472 | | |
467 | 473 | | |
| |||
772 | 778 | | |
773 | 779 | | |
774 | 780 | | |
775 | | - | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
776 | 787 | | |
777 | 788 | | |
778 | 789 | | |
| |||
781 | 792 | | |
782 | 793 | | |
783 | 794 | | |
| 795 | + | |
784 | 796 | | |
785 | 797 | | |
786 | 798 | | |
787 | 799 | | |
| 800 | + | |
| 801 | + | |
788 | 802 | | |
789 | 803 | | |
790 | 804 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1186 | 1186 | | |
1187 | 1187 | | |
1188 | 1188 | | |
| 1189 | + | |
| 1190 | + | |
| 1191 | + | |
| 1192 | + | |
| 1193 | + | |
| 1194 | + | |
| 1195 | + | |
| 1196 | + | |
| 1197 | + | |
| 1198 | + | |
| 1199 | + | |
| 1200 | + | |
| 1201 | + | |
| 1202 | + | |
| 1203 | + | |
| 1204 | + | |
| 1205 | + | |
| 1206 | + | |
| 1207 | + | |
| 1208 | + | |
| 1209 | + | |
| 1210 | + | |
1189 | 1211 | | |
1190 | 1212 | | |
1191 | 1213 | | |
| |||
0 commit comments