diff options
author | monster <monster@yandex-team.ru> | 2022-04-18 18:40:04 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-04-18 18:40:04 +0300 |
commit | 7b1f3c923b66413c49cb0df439646ff1f1348b42 (patch) | |
tree | 5e1fc084cb211752e5857afc1240054075f87994 | |
parent | 63e875f14b9178656076f4fd361465a729b9cc13 (diff) | |
download | ydb-7b1f3c923b66413c49cb0df439646ff1f1348b42.tar.gz |
fix BS_QUEUE log messages KIKIMR-9989
REVIEW: 2409477
REVIEW: 2412530
x-ydb-stable-ref: d2ff68dbc0487eda79306b4400fb9ae92d90d9fd
-rw-r--r-- | ydb/core/blobstorage/backpressure/queue_backpressure_client.cpp | 32 |
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 200b85f616..c691187379 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, @@ -472,17 +473,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 = {}; @@ -501,7 +514,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; @@ -531,7 +545,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() @@ -570,13 +584,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)); |