Skip to content

Commit 30f1c6c

Browse files
authored
YQ-4103 fixed overflow in kqp write actor CalculateNextAttemptDelay (#14415)
1 parent 045e4e6 commit 30f1c6c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

ydb/core/kqp/runtime/kqp_write_actor.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
namespace {
3333
TDuration CalculateNextAttemptDelay(const NKikimr::NKqp::TWriteActorSettings& settings, ui64 attempt) {
3434
auto delay = settings.StartRetryDelay;
35-
for (ui64 index = 0; index < attempt; ++index) {
35+
for (ui64 index = 0; index < attempt && delay * (1 - settings.UnsertaintyRatio) <= settings.MaxRetryDelay; ++index) {
3636
delay *= settings.Multiplier;
3737
}
3838

@@ -214,7 +214,8 @@ class TKqpTableWriteActor : public TActorBootstrapped<TKqpTableWriteActor> {
214214
const TActorId sessionActorId,
215215
TIntrusivePtr<TKqpCounters> counters,
216216
NWilson::TTraceId traceId)
217-
: TypeEnv(typeEnv)
217+
: MessageSettings(GetWriteActorSettings())
218+
, TypeEnv(typeEnv)
218219
, Alloc(alloc)
219220
, MvccSnapshot(mvccSnapshot)
220221
, LockMode(lockMode)

0 commit comments

Comments
 (0)