Skip to content

Commit 99f57d9

Browse files
authored
Fixed infinity loop when initializing MLP consumer (#30443)
1 parent 7c84fd2 commit 99f57d9

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

ydb/core/persqueue/pqtablet/partition/mlp/mlp_consumer.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,14 @@ void TConsumerActor::HandleOnInit(TEvKeyValue::TEvResponse::TPtr& ev) {
257257
LOG_D("WAL overrun");
258258
auto request = std::make_unique<TEvKeyValue::TEvRequest>();
259259
request->Record.SetCookie(static_cast<ui64>(EKvCookie::WALRead));
260-
AddReadWAL(request, PartitionId, Config.GetName(), LastWALIndex);
260+
261+
auto* readWAL = request->Record.AddCmdReadRange();
262+
readWAL->MutableRange()->SetFrom(walResult.GetPair().rbegin()->GetKey());
263+
readWAL->MutableRange()->SetIncludeFrom(false);
264+
readWAL->MutableRange()->SetTo(MaxWALKey(PartitionId, Config.GetName()));
265+
readWAL->MutableRange()->SetIncludeTo(true);
266+
readWAL->SetIncludeData(true);
267+
261268
Send(TabletActorId, std::move(request));
262269
return;
263270
}

0 commit comments

Comments
 (0)