Skip to content

Commit 0d16841

Browse files
committed
Revert "test"
This reverts commit ef47d68.
1 parent ef47d68 commit 0d16841

File tree

2 files changed

+3
-12
lines changed

2 files changed

+3
-12
lines changed

src/Ydb.Sdk/src/Ado/YdbCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ protected override async Task<DbDataReader> ExecuteDbDataReaderAsync(CommandBeha
210210
? new GrpcRequestSettings { TransportTimeout = TimeSpan.FromSeconds(CommandTimeout) }
211211
: new GrpcRequestSettings();
212212

213-
var transaction = Transaction ?? YdbConnection.CurrentTransaction;
213+
var transaction = YdbConnection.CurrentTransaction;
214214

215215
if (Transaction != null && Transaction != transaction)
216216
{

src/Ydb.Sdk/src/Ado/YdbConnection.cs

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -72,17 +72,8 @@ public YdbTransaction BeginTransaction(TransactionMode transactionMode = Transac
7272
if (CurrentTransaction is { Completed: false })
7373
{
7474
throw new InvalidOperationException(
75-
"A transaction is already in progress; nested/concurrent transactions aren't supported.");
76-
}
77-
78-
if (Session is ImplicitSession)
79-
{
80-
var driver = Session.Driver;
81-
Session.Dispose();
82-
83-
var factory = new PoolingSessionFactory(driver, ConnectionStringBuilder);
84-
var pooledSource = new PoolingSessionSource<PoolingSession>(factory, ConnectionStringBuilder);
85-
Session = pooledSource.OpenSession(CancellationToken.None).GetAwaiter().GetResult();
75+
"A transaction is already in progress; nested/concurrent transactions aren't supported."
76+
);
8677
}
8778

8879
CurrentTransaction = new YdbTransaction(this, transactionMode);

0 commit comments

Comments
 (0)