Skip to content

Commit 939df8d

Browse files
nikvas0dorooleg
authored andcommitted
Fix unavailable error (ydb-platform#14939)
1 parent b5c7338 commit 939df8d

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

ydb/core/kqp/runtime/kqp_write_actor.cpp

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1056,7 +1056,7 @@ class TKqpTableWriteActor : public TActorBootstrapped<TKqpTableWriteActor> {
10561056
<< "': attach transaction failed.");
10571057
} else {
10581058
RuntimeError(
1059-
NYql::NDqProto::StatusIds::UNAVAILABLE,
1059+
NYql::NDqProto::StatusIds::UNDETERMINED,
10601060
NYql::TIssuesIds::KIKIMR_OPERATION_STATE_UNKNOWN,
10611061
TStringBuilder()
10621062
<< "ShardId=" << shardId
@@ -2229,11 +2229,19 @@ class TKqpBufferWriteActor :public TActorBootstrapped<TKqpBufferWriteActor>, pub
22292229
return;
22302230
}
22312231

2232-
ReplyErrorAndDie(
2233-
NYql::NDqProto::StatusIds::UNAVAILABLE,
2234-
NYql::TIssuesIds::KIKIMR_TEMPORARILY_UNAVAILABLE,
2235-
TStringBuilder() << "Failed to deviler message.",
2236-
{});
2232+
if (State == EState::COMMITTING) {
2233+
ReplyErrorAndDie(
2234+
NYql::NDqProto::StatusIds::UNDETERMINED,
2235+
NYql::TIssuesIds::KIKIMR_OPERATION_STATE_UNKNOWN,
2236+
TStringBuilder() << "Failed to deviler message.",
2237+
{});
2238+
} else {
2239+
ReplyErrorAndDie(
2240+
NYql::NDqProto::StatusIds::UNAVAILABLE,
2241+
NYql::TIssuesIds::KIKIMR_TEMPORARILY_UNAVAILABLE,
2242+
TStringBuilder() << "Failed to deviler message.",
2243+
{});
2244+
}
22372245
}
22382246

22392247
void Handle(TEvKqpBuffer::TEvTerminate::TPtr&) {

0 commit comments

Comments
 (0)