Skip to content

Commit

Permalink
[-] TEvQueryRequest in FinalCleanupState
Browse files Browse the repository at this point in the history
  • Loading branch information
Alek5andr-Kotov committed Nov 25, 2024
1 parent b7cfb36 commit c59ae41
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
5 changes: 5 additions & 0 deletions ydb/core/kqp/session_actor/kqp_session_actor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2389,6 +2389,10 @@ class TKqpSessionActor : public TActorBootstrapped<TKqpSessionActor> {
PassAway();
}

void HandleFinalCleanup(TEvKqp::TEvQueryRequest::TPtr& ev) {
ReplyProcessError(ev, Ydb::StatusIds::BAD_SESSION, "Session is under shutdown");
}

STFUNC(ReadyState) {
try {
switch (ev->GetTypeRewrite()) {
Expand Down Expand Up @@ -2523,6 +2527,7 @@ class TKqpSessionActor : public TActorBootstrapped<TKqpSessionActor> {
hFunc(TEvents::TEvUndelivered, HandleNoop);
hFunc(TEvKqpSnapshot::TEvCreateSnapshotResponse, Handle);
hFunc(NWorkload::TEvContinueRequest, HandleNoop);
hFunc(TEvKqp::TEvQueryRequest, HandleFinalCleanup);
}
} catch (const yexception& ex) {
InternalError(ex.what());
Expand Down
18 changes: 9 additions & 9 deletions ydb/public/sdk/cpp/client/ydb_topic/ut/topic_to_table_ut.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -545,15 +545,15 @@ Y_UNIT_TEST_F(Offsets_Cannot_Be_Promoted_When_Reading_In_A_Transaction, TFixture
UNIT_ASSERT_EXCEPTION(ReadMessage(reader, {.Tx = tx, .CommitOffsets = true}), yexception);
}

//Y_UNIT_TEST_F(WriteToTopic_Invalid_Session, TFixture)
//{
// WriteToTopicWithInvalidTxId(false);
//}
//
//Y_UNIT_TEST_F(WriteToTopic_Invalid_Tx, TFixture)
//{
// WriteToTopicWithInvalidTxId(true);
//}
Y_UNIT_TEST_F(WriteToTopic_Invalid_Session, TFixture)
{
WriteToTopicWithInvalidTxId(false);
}

Y_UNIT_TEST_F(WriteToTopic_Invalid_Tx, TFixture)
{
WriteToTopicWithInvalidTxId(true);
}

Y_UNIT_TEST_F(WriteToTopic_Two_WriteSession, TFixture)
{
Expand Down

0 comments on commit c59ae41

Please sign in to comment.