aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexey Borzenkov <snaury@yandex-team.ru>2022-03-04 19:41:19 +0300
committerAlexey Borzenkov <snaury@yandex-team.ru>2022-03-04 19:41:19 +0300
commit9d09a3bbd0147503b44ac6fcd470418dab319889 (patch)
treeef52d058811bd0aa141abd5ad844f3b42f79fa00
parent7a3824569306e0314575376cfaa33b18b2a4b5fa (diff)
downloadydb-9d09a3bbd0147503b44ac6fcd470418dab319889.tar.gz
Ignore undelivery notifications for TEvConnect after a successful connect, KIKIMR-14465
ref:da119105f567cb6f3392feedf94a97f4b427a9ef
-rw-r--r--ydb/core/tablet/tablet_pipe_client.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/ydb/core/tablet/tablet_pipe_client.cpp b/ydb/core/tablet/tablet_pipe_client.cpp
index 2fa35af9a0e..2cdd9be5535 100644
--- a/ydb/core/tablet/tablet_pipe_client.cpp
+++ b/ydb/core/tablet/tablet_pipe_client.cpp
@@ -315,7 +315,7 @@ namespace NTabletPipe {
void HandleConnect(TEvents::TEvUndelivered::TPtr& ev, const TActorContext &ctx) {
const auto* msg = ev->Get();
if (msg->SourceType != TEvTabletPipe::TEvConnect::EventType || ev->Cookie != ConnectCookie) {
- BLOG_D("ignored unexpected TEvUndelivered of event " << msg->SourceType << " with cookie " << ev->Cookie);
+ BLOG_D("ignored unexpected TEvUndelivered for event " << msg->SourceType << " with cookie " << ev->Cookie);
return;
}
@@ -324,7 +324,13 @@ namespace NTabletPipe {
}
void Handle(TEvents::TEvUndelivered::TPtr& ev, const TActorContext& ctx) {
- Y_UNUSED(ev);
+ const auto* msg = ev->Get();
+ if (msg->SourceType == TEvTabletPipe::TEvConnect::EventType) {
+ // We have connected already, ignore undelivered notifications from older attempts
+ BLOG_D("ignored unexpected TEvUndelivered for event " << msg->SourceType << " with cookie " << ev->Cookie);
+ return;
+ }
+
BLOG_D("pipe event not delivered, drop pipe");
return NotifyDisconnect(ctx);
}