Skip to content

Commit 2631f5b

Browse files
authored
fix bug: limit retries in starting state (#3398)
1 parent d547c4c commit 2631f5b

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

ydb/core/kqp/compute_actor/kqp_scan_fetcher_actor.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,14 @@ void TKqpScanFetcherActor::HandleExecute(TEvKqpCompute::TEvScanError::TPtr& ev)
154154
}
155155

156156
if (state->State == EShardState::Starting) {
157+
++TotalRetries;
158+
if (TotalRetries >= MAX_TOTAL_SHARD_RETRIES) {
159+
CA_LOG_E("TKqpScanFetcherActor: broken tablet for this request " << state->TabletId
160+
<< ", retries limit exceeded (" << state->TotalRetries << "/" << TotalRetries << ")");
161+
SendGlobalFail(NDqProto::COMPUTE_STATE_FAILURE, YdbStatusToDqStatus(status), issues);
162+
return PassAway();
163+
}
164+
157165
if (FindSchemeErrorInIssues(status, issues)) {
158166
return EnqueueResolveShard(state);
159167
}

0 commit comments

Comments
 (0)