From d6de87718f17815864478f1975160731b3ff0235 Mon Sep 17 00:00:00 2001 From: Pavel Misko Date: Wed, 14 Aug 2024 18:26:13 +0200 Subject: [PATCH] issue-1791: added logs (#1797) * issue-1791: added logs --- .../part_nonrepl_rdma_actor.cpp | 12 +++++++++++ .../libs/storage/volume/volume_actor.cpp | 20 +++++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/cloud/blockstore/libs/storage/partition_nonrepl/part_nonrepl_rdma_actor.cpp b/cloud/blockstore/libs/storage/partition_nonrepl/part_nonrepl_rdma_actor.cpp index 9922c602d63..d6bbe564bd7 100644 --- a/cloud/blockstore/libs/storage/partition_nonrepl/part_nonrepl_rdma_actor.cpp +++ b/cloud/blockstore/libs/storage/partition_nonrepl/part_nonrepl_rdma_actor.cpp @@ -466,6 +466,12 @@ void TNonreplicatedPartitionRdmaActor::HandleWakeup( void TNonreplicatedPartitionRdmaActor::ReplyAndDie(const NActors::TActorContext& ctx) { + LOG_INFO( + ctx, + TBlockStoreComponents::PARTITION, + "[%s] Reply and die", + SelfId().ToString().c_str()); + for (auto& [_, endpoint]: AgentId2EndpointFuture) { endpoint.Subscribe([](auto& future) { if (future.HasValue()) { @@ -489,6 +495,12 @@ void TNonreplicatedPartitionRdmaActor::HandlePoisonPill( MakeIntrusive()); if (!RequestsInProgress.Empty()) { + LOG_INFO( + ctx, + TBlockStoreComponents::PARTITION, + "[%s] Postpone PoisonPill response. Wait for requests in progress", + SelfId().ToString().c_str()); + return; } diff --git a/cloud/blockstore/libs/storage/volume/volume_actor.cpp b/cloud/blockstore/libs/storage/volume/volume_actor.cpp index 1676fe2cb20..ff814d29500 100644 --- a/cloud/blockstore/libs/storage/volume/volume_actor.cpp +++ b/cloud/blockstore/libs/storage/volume/volume_actor.cpp @@ -26,6 +26,7 @@ #include #include +#include namespace NCloud::NBlockStore::NStorage { @@ -597,11 +598,30 @@ void TVolumeActor::HandlePoisonTaken( } } + const auto removed = std::distance(WaitForPartitions.begin(), it); + WaitForPartitions.erase(WaitForPartitions.begin(), it); if (WaitForPartitions.empty()) { StoppedPartitions.clear(); } + + TStringStream waitList; + for (const auto& [p, _]: WaitForPartitions) { + waitList << p.ToString() << " "; + } + + TStringStream stoppedList; + for (const auto& p: StoppedPartitions) { + stoppedList << p.ToString() << " "; + } + + LOG_INFO(ctx, TBlockStoreComponents::VOLUME, + "[%lu] Partitions removed from the wait list: %lu. W: [ %s], S: [ %s]", + TabletID(), + removed, + waitList.Str().c_str(), + stoppedList.Str().c_str()); } void TVolumeActor::HandleUpdateThrottlerState(