Skip to content

Commit

Permalink
issue-1791: added logs (#1797)
Browse files Browse the repository at this point in the history
* issue-1791: added logs
  • Loading branch information
sharpeye authored Aug 14, 2024
1 parent 7712258 commit d6de877
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand All @@ -489,6 +495,12 @@ void TNonreplicatedPartitionRdmaActor::HandlePoisonPill(
MakeIntrusive<TCallContext>());

if (!RequestsInProgress.Empty()) {
LOG_INFO(
ctx,
TBlockStoreComponents::PARTITION,
"[%s] Postpone PoisonPill response. Wait for requests in progress",
SelfId().ToString().c_str());

return;
}

Expand Down
20 changes: 20 additions & 0 deletions cloud/blockstore/libs/storage/volume/volume_actor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include <library/cpp/lwtrace/signature.h>

#include <util/string/builder.h>
#include <util/stream/str.h>

namespace NCloud::NBlockStore::NStorage {

Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit d6de877

Please sign in to comment.