Skip to content

Commit 442cb12

Browse files
fix
1 parent e266e9a commit 442cb12

File tree

2 files changed

+3
-26
lines changed

2 files changed

+3
-26
lines changed

src/Ydb.Sdk/src/Ado/Session/PoolingSession.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
// This file contains session pooling algorithms adapted from Npgsql
2-
// Original source: https://github.com/npgsql/npgsql
3-
// Copyright (c) 2002-2025, Npgsql
4-
// Licence https://github.com/npgsql/npgsql?tab=PostgreSQL-1-ov-file
5-
61
using Microsoft.Extensions.Logging;
72
using Ydb.Query;
83
using Ydb.Query.V1;

src/Ydb.Sdk/src/Ado/Session/PoolingSessionSource.cs

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,7 @@
11
// This file contains session pooling algorithms adapted from Npgsql
22
// Original source: https://github.com/npgsql/npgsql
3-
// Copyright (c) 2002-2023, Npgsql
4-
//
5-
// Permission to use, copy, modify, and distribute this software and its
6-
// documentation for any purpose, without fee, and without a written agreement
7-
// is hereby granted, provided that the above copyright notice and this
8-
// paragraph and the following two paragraphs appear in all copies.
9-
//
10-
// IN NO EVENT SHALL NPGSQL BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
11-
// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
12-
// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
13-
// NPGSQL HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
14-
//
15-
// NPGSQL SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
16-
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
17-
// THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND NPGSQL HAS NO
18-
// OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR
19-
// MODIFICATIONS.
20-
//
21-
// Adapted for YDB .NET SDK with modifications for IPoolingSession interface
22-
// and YDB-specific session management requirements.
3+
// Copyright (c) 2002-2025, Npgsql
4+
// Licence https://github.com/npgsql/npgsql?tab=PostgreSQL-1-ov-file
235

246
using System.Diagnostics.CodeAnalysis;
257
using System.Runtime.CompilerServices;
@@ -111,6 +93,7 @@ private async ValueTask<IPoolingSession> RentAsync(CancellationToken cancellatio
11193
{
11294
ctsGetSession.CancelAfter(TimeSpan.FromSeconds(_createSessionTimeout));
11395
}
96+
11497
var finalToken = ctsGetSession.Token;
11598

11699
try
@@ -299,7 +282,6 @@ private static void PruneIdleSessions(object? state)
299282

300283
if (pool._logger.IsEnabled(LogLevel.Debug))
301284
{
302-
303285
}
304286

305287
while (toPrune > 0 &&

0 commit comments

Comments
 (0)