Skip to content

Commit 5fe8d6d

Browse files
KirillKurdyukovmessieurMe
authored andcommitted
fixes
1 parent 1cb1f81 commit 5fe8d6d

File tree

2 files changed

+5
-504
lines changed

2 files changed

+5
-504
lines changed

src/EFCore.Ydb/src/Storage/Internal/YdbExecutionStrategy.cs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,8 @@
55
namespace EntityFrameworkCore.Ydb.Storage.Internal;
66

77
public class YdbExecutionStrategy(ExecutionStrategyDependencies dependencies)
8-
: ExecutionStrategy(dependencies, maxRetryCount: 10, maxRetryDelay: TimeSpan.FromSeconds(10))
8+
: ExecutionStrategy(dependencies, maxRetryCount: 10, maxRetryDelay: TimeSpan.FromSeconds(10)) // TODO User settings
99
{
1010
protected override bool ShouldRetryOn(Exception exception)
11-
=> exception is YdbException ydbException && (
12-
TransactionLockInvalidated(ydbException)
13-
|| false // For other possible exceptions
14-
);
15-
16-
private static bool TransactionLockInvalidated(YdbException exception)
17-
=> exception.Message.Contains("Transaction locks invalidated");
11+
=> exception is YdbException { IsTransient: true };
1812
}

0 commit comments

Comments
 (0)