Skip to content

Commit 932587f

Browse files
authored
[Filestore] improve service.TReadDataActor logs (#2845)
1 parent 48a64e3 commit 932587f

File tree

1 file changed

+28
-16
lines changed

1 file changed

+28
-16
lines changed

cloud/filestore/libs/storage/service/service_actor_readdata.cpp

Lines changed: 28 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,9 @@ void TReadDataActor::DescribeData(const TActorContext& ctx)
137137
LOG_DEBUG(
138138
ctx,
139139
TFileStoreComponents::SERVICE,
140-
"Executing DescribeData for %lu, %lu, %lu, %lu",
140+
"%s executing DescribeData for node: %lu, "
141+
"handle: %lu, offset: %lu, length: %lu",
142+
LogTag.c_str(),
141143
ReadRequest.GetNodeId(),
142144
ReadRequest.GetHandle(),
143145
ReadRequest.GetOffset(),
@@ -285,7 +287,8 @@ void TReadDataActor::HandleDescribeDataResponse(
285287
LOG_DEBUG(
286288
ctx,
287289
TFileStoreComponents::SERVICE,
288-
"DescribeData succeeded %lu freshdata + %lu blobpieces",
290+
"%s DescribeData succeeded %lu freshdata + %lu blobpieces",
291+
LogTag.c_str(),
289292
msg->Record.FreshDataRangesSize(),
290293
msg->Record.BlobPiecesSize());
291294

@@ -379,22 +382,24 @@ void TReadDataActor::HandleReadBlobResponse(
379382
const auto* msg = ev->Get();
380383

381384
if (msg->Status != NKikimrProto::OK) {
382-
const auto errorReason = FormatError(
383-
MakeError(MAKE_KIKIMR_ERROR(msg->Status), msg->ErrorReason));
384385
LOG_WARN(
385386
ctx,
386387
TFileStoreComponents::SERVICE,
387-
"ReadBlob error: %s",
388-
errorReason.c_str());
389-
ReadData(ctx, errorReason);
388+
"%s TEvBlobStorage::TEvGet failed: response %s",
389+
LogTag.c_str(),
390+
msg->Print(false).c_str());
390391

392+
const auto errorReason = FormatError(
393+
MakeError(MAKE_KIKIMR_ERROR(msg->Status), msg->ErrorReason));
394+
ReadData(ctx, errorReason);
391395
return;
392396
}
393397

394398
LOG_DEBUG(
395399
ctx,
396400
TFileStoreComponents::SERVICE,
397-
"ReadBlobResponse count: %lu, status: %lu, cookie: %lu",
401+
"%s ReadBlobResponse count: %lu, status: %lu, cookie: %lu",
402+
LogTag.c_str(),
398403
msg->ResponseSz,
399404
(ui64)(msg->Status),
400405
ev->Cookie);
@@ -409,15 +414,18 @@ void TReadDataActor::HandleReadBlobResponse(
409414
const auto& blobRange = blobPiece.GetRanges(i);
410415
const auto& response = msg->Responses[i];
411416
if (response.Status != NKikimrProto::OK) {
412-
const auto errorReason = FormatError(
413-
MakeError(MAKE_KIKIMR_ERROR(response.Status), "read error"));
414417
LOG_WARN(
415418
ctx,
416419
TFileStoreComponents::SERVICE,
417-
"ReadBlob error: %s",
418-
errorReason.c_str());
419-
ReadData(ctx, errorReason);
420+
"%s TEvBlobStorage::TEvGet query failed:"
421+
" status %s, response %s",
422+
LogTag.c_str(),
423+
NKikimrProto::EReplyStatus_Name(response.Status).c_str(),
424+
msg->Print(false).c_str());
420425

426+
const auto errorReason = FormatError(
427+
MakeError(MAKE_KIKIMR_ERROR(response.Status), "read error"));
428+
ReadData(ctx, errorReason);
421429
return;
422430
}
423431

@@ -438,7 +446,8 @@ void TReadDataActor::HandleReadBlobResponse(
438446
LOG_WARN(
439447
ctx,
440448
TFileStoreComponents::SERVICE,
441-
"ReadBlob error: %s",
449+
"%s ReadBlob error: %s",
450+
LogTag.c_str(),
442451
error.c_str());
443452
ReadData(ctx, error);
444453

@@ -503,7 +512,9 @@ void TReadDataActor::ReadData(
503512
LOG_WARN(
504513
ctx,
505514
TFileStoreComponents::SERVICE,
506-
"Falling back to ReadData for %lu, %lu, %lu, %lu. Message: %s",
515+
"%s falling back to ReadData: "
516+
"node: %lu, handle: %lu, offset: %lu, length: %lu. Message: %s",
517+
LogTag.c_str(),
507518
ReadRequest.GetNodeId(),
508519
ReadRequest.GetHandle(),
509520
ReadRequest.GetOffset(),
@@ -567,7 +578,8 @@ void TReadDataActor::ReplyAndDie(const TActorContext& ctx)
567578
LOG_DEBUG(
568579
ctx,
569580
TFileStoreComponents::SERVICE,
570-
"processed fresh data range size: %lu, offset: %lu",
581+
"%s processed fresh data range size: %lu, offset: %lu",
582+
LogTag.c_str(),
571583
content.size(),
572584
offset);
573585
}

0 commit comments

Comments
 (0)