Skip to content

Commit 81c68a8

Browse files
committed
Fixed initialization of SessionPoolConfig
1 parent e63dc1c commit 81c68a8

File tree

3 files changed

+4
-8
lines changed

3 files changed

+4
-8
lines changed

src/Ydb.Sdk/CHANGELOG.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
## v0.20.2
2-
- Added `DisableServerBalancer` option to ADO.NET session creation; default false.
3-
41
## v0.20.1
52

63
- Fixed bug ADO.NET: `YdbSchema.SchemaObjects` and `Ydb.DescribeTable`methods are public for `EntityFrameworkCore.Ydb`.

src/Ydb.Sdk/src/GrpcDefaultSettings.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,4 @@ internal static class GrpcDefaultSettings
2121
internal const bool EnableMultipleHttp2Connections = false;
2222

2323
internal const bool DisableDiscovery = false;
24-
25-
internal const bool DisableServerBalancer = false;
2624
}

src/Ydb.Sdk/src/Pool/SessionPool.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,12 @@ internal abstract class SessionPool<TSession> where TSession : SessionBase<TSess
1818
private volatile int _waitingCount;
1919
private volatile bool _disposed;
2020

21-
protected SessionPool(ILogger<SessionPool<TSession>> logger, SessionPoolConfig sessionPoolConfig)
21+
protected SessionPool(ILogger<SessionPool<TSession>> logger, SessionPoolConfig config)
2222
{
2323
Logger = logger;
24-
_size = sessionPoolConfig.MaxSessionPool;
25-
_createSessionTimeoutMs = sessionPoolConfig.CreateSessionTimeout * 1000;
24+
Config = config;
25+
_size = config.MaxSessionPool;
26+
_createSessionTimeoutMs = config.CreateSessionTimeout * 1000;
2627
_semaphore = new SemaphoreSlim(_size);
2728
}
2829

0 commit comments

Comments
 (0)