aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormonster <monster@yandex-team.ru>2022-03-24 18:03:34 +0300
committermonster <monster@yandex-team.ru>2022-03-24 18:03:34 +0300
commit5b38bc8a727d799624f5da8f3065d11981508402 (patch)
treebdc69ede3d57008e6e4126e62df291289c94bda2
parent14d5b06392b7db4bf94cf141ba6dc079c08022ae (diff)
downloadydb-5b38bc8a727d799624f5da8f3065d11981508402.tar.gz
fix BS_QUEUE log messages KIKIMR-9989
ref:1cf46525beda2794c1a3c5c2473c014ce2e2fc92
-rw-r--r--ydb/core/blobstorage/backpressure/queue_backpressure_client.cpp32
1 files changed, 26 insertions, 6 deletions
diff --git a/ydb/core/blobstorage/backpressure/queue_backpressure_client.cpp b/ydb/core/blobstorage/backpressure/queue_backpressure_client.cpp
index d224e047f3..acdd648a53 100644
--- a/ydb/core/blobstorage/backpressure/queue_backpressure_client.cpp
+++ b/ydb/core/blobstorage/backpressure/queue_backpressure_client.cpp
@@ -45,6 +45,7 @@ class TVDiskBackpressureClientActor : public TActorBootstrapped<TVDiskBackpressu
std::optional<NKikimrBlobStorage::TGroupInfo> RecentGroup;
TIntrusivePtr<TBlobStorageGroupInfo> Info;
TBlobStorageGroupType GType;
+ TInstant ConnectionFailureTime;
enum class EState {
INITIAL,
@@ -468,17 +469,29 @@ private:
}
}
- void HandleConnected(TEvInterconnect::TEvNodeConnected::TPtr ev, const TActorContext& /*ctx*/) {
+ void HandleConnected(TEvInterconnect::TEvNodeConnected::TPtr ev, const TActorContext& ctx) {
if (ev->Get()->NodeId == RemoteVDisk.NodeId()) {
Y_VERIFY(!SessionId || SessionId == ev->Sender, "SessionId# %s Sender# %s", SessionId.ToString().data(),
ev->Sender.ToString().data());
SessionId = ev->Sender;
+
+ if (ConnectionFailureTime) {
+ QLOG_WARN_S("BSQ20", "TEvNodeConnected NodeId# " << ev->Get()->NodeId
+ << " ConnectionFailureTime# " << ConnectionFailureTime
+ << " connection was recovered");
+ ConnectionFailureTime = TInstant();
+ }
}
}
void HandleDisconnected(TEvInterconnect::TEvNodeDisconnected::TPtr& ev, const TActorContext &ctx) {
- QLOG_INFO_S("BSQ13", "TEvNodeDisconnected NodeId# " << ev->Get()->NodeId);
if (ev->Get()->NodeId == RemoteVDisk.NodeId()) {
+ if (!ConnectionFailureTime) {
+ ConnectionFailureTime = ctx.Now();
+ QLOG_WARN_S("BSQ13", "TEvNodeDisconnected NodeId# " << ev->Get()->NodeId
+ << " ConnectionFailureTime# " << ConnectionFailureTime);
+ }
+
ResetConnection(ctx, NKikimrProto::ERROR, "node disconnected", TDuration::Seconds(1));
Y_VERIFY(!SessionId || SessionId == ev->Sender);
SessionId = {};
@@ -497,7 +510,8 @@ private:
QLOG_INFO_S("BSQ16", "called"
<< " CheckReadinessCookie# " << CheckReadinessCookie
- << " State# " << GetStateName());
+ << " State# " << GetStateName()
+ << (ConnectionFailureTime ? " ConnectionFailureTime# " + ConnectionFailureTime.ToString() : ""));
if (State != EState::INITIAL && State != EState::EXPECT_READY_NOTIFY) {
return;
@@ -527,7 +541,7 @@ private:
}
void HandleCheckReadiness(TEvBlobStorage::TEvVCheckReadinessResult::TPtr& ev, const TActorContext& ctx) {
- QLOG_INFO_S("BSQ17", "received TEvVCheckReadinessResult"
+ QLOG_INFO_S("BSQ17", "TEvVCheckReadinessResult"
<< " Cookie# " << ev->Cookie
<< " CheckReadinessCookie# " << CheckReadinessCookie
<< " State# " << GetStateName()
@@ -566,13 +580,19 @@ private:
}
void HandleUndelivered(TEvents::TEvUndelivered::TPtr &ev, const TActorContext &ctx) {
- QLOG_INFO_S("BSQ02", "Sender# " << ev->Sender
+ if (!ConnectionFailureTime) {
+ ConnectionFailureTime = ctx.Now();
+ }
+
+ QLOG_INFO_S("BSQ02", "TEvUndelivered"
+ << " Sender# " << ev->Sender
<< " RemoteVDisk# " << RemoteVDisk
<< " SourceType# " << ev->Get()->SourceType
<< " Cookie# " << ev->Cookie
<< " CheckReadinessCookie# " << CheckReadinessCookie
<< " State# " << GetStateName()
- << " Reason# " << ev->Get()->Reason);
+ << " Reason# " << ev->Get()->Reason
+ << " ConnectionFailureTime# " << ConnectionFailureTime);
if (ev->Sender == RemoteVDisk) {
ResetConnection(ctx, NKikimrProto::ERROR, "event undelivered", TDuration::Seconds(1));