Skip to content

Commit

Permalink
fix incorrect processing event undelivering in scan fetcher (#13092)
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanmorozov333 authored Dec 28, 2024
1 parent 22e791d commit 71ad71f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
4 changes: 4 additions & 0 deletions ydb/core/kqp/compute_actor/kqp_scan_compute_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ class TShardScannerInfo {
new TEvPipeCache::TEvForward(ev.release(), TabletId, !subscribed), IEventHandle::FlagTrackDelivery);
}

ui64 GetTabletId() const {
return TabletId;
}

TString ToString() const {
TStringBuilder builder;

Expand Down
10 changes: 5 additions & 5 deletions ydb/core/kqp/compute_actor/kqp_scan_fetcher_actor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -373,11 +373,11 @@ void TKqpScanFetcherActor::HandleExecute(TEvents::TEvUndelivered::TPtr& ev) {
case TEvKqpCompute::TEvScanDataAck::EventType: {
auto info = InFlightShards.GetShardScanner(ev->Cookie);
if (!!info) {
TStringBuilder builder;
builder << "Delivery problem: EvScanDataAck lost, NodeId: "
<< SelfId().NodeId() << ", Details: " << info->ToString() << ".";

SendGlobalFail(NDqProto::StatusIds::UNAVAILABLE, TIssuesIds::DEFAULT_ERROR, TString(builder));
auto state = InFlightShards.GetShardStateVerified(info->GetTabletId());
AFL_WARN(NKikimrServices::KQP_COMPUTE)("event", "TEvents::TEvUndelivered")("from_tablet", info->GetTabletId())
("state", state->State)("details", info->ToString())("node", SelfId().NodeId());
AFL_VERIFY(state->State == EShardState::Running)("state", state->State);
RetryDeliveryProblem(state);
}
return;
}
Expand Down

0 comments on commit 71ad71f

Please sign in to comment.