Skip to content

Commit

Permalink
fix bug: limit retries in starting state (ydb-platform#3398)
Browse files Browse the repository at this point in the history
  • Loading branch information
gridnevvvit authored Apr 3, 2024
1 parent d547c4c commit 2631f5b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions ydb/core/kqp/compute_actor/kqp_scan_fetcher_actor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,14 @@ void TKqpScanFetcherActor::HandleExecute(TEvKqpCompute::TEvScanError::TPtr& ev)
}

if (state->State == EShardState::Starting) {
++TotalRetries;
if (TotalRetries >= MAX_TOTAL_SHARD_RETRIES) {
CA_LOG_E("TKqpScanFetcherActor: broken tablet for this request " << state->TabletId
<< ", retries limit exceeded (" << state->TotalRetries << "/" << TotalRetries << ")");
SendGlobalFail(NDqProto::COMPUTE_STATE_FAILURE, YdbStatusToDqStatus(status), issues);
return PassAway();
}

if (FindSchemeErrorInIssues(status, issues)) {
return EnqueueResolveShard(state);
}
Expand Down

0 comments on commit 2631f5b

Please sign in to comment.