@@ -237,7 +237,7 @@ class TBlobCache: public TActorBootstrapped<TBlobCache> {
237
237
if (it != Cache.End ()) {
238
238
Hits->Inc ();
239
239
HitsBytes->Add (blobRange.Size );
240
- SendResult (sender, blobRange, NKikimrProto::OK, it.Value (), ctx, true );
240
+ SendResult (sender, blobRange, NKikimrProto::OK, it.Value (), {}, ctx, true );
241
241
return true ;
242
242
}
243
243
@@ -423,10 +423,10 @@ class TBlobCache: public TActorBootstrapped<TBlobCache> {
423
423
}
424
424
425
425
void SendResult (const TActorId& to, const TBlobRange& blobRange, NKikimrProto::EReplyStatus status,
426
- const TString& data, const TActorContext& ctx, const bool fromCache = false ) {
426
+ const TString& data, const TString& detailedError, const TActorContext& ctx, const bool fromCache = false ) {
427
427
LOG_S_DEBUG (" Send result: " << blobRange << " to: " << to << " status: " << status);
428
428
429
- ctx.Send (to, new TEvBlobCache::TEvReadBlobRangeResult (blobRange, status, data, fromCache));
429
+ ctx.Send (to, new TEvBlobCache::TEvReadBlobRangeResult (blobRange, status, data, detailedError, fromCache));
430
430
}
431
431
432
432
void Handle (TEvBlobStorage::TEvGetResult::TPtr& ev, const TActorContext& ctx) {
@@ -436,7 +436,9 @@ class TBlobCache: public TActorBootstrapped<TBlobCache> {
436
436
Y_ABORT (" Unexpected reply from blobstorage" );
437
437
}
438
438
439
+ TString detailedError;
439
440
if (ev->Get ()->Status != NKikimrProto::EReplyStatus::OK) {
441
+ detailedError = ev->Get ()->ToString ();
440
442
AFL_WARN (NKikimrServices::BLOB_CACHE)(" fail" , ev->Get ()->ToString ());
441
443
ReadSimpleFailedBytes->Add (ev->Get ()->ResponseSz );
442
444
ReadSimpleFailedCount->Add (1 );
@@ -458,14 +460,14 @@ class TBlobCache: public TActorBootstrapped<TBlobCache> {
458
460
459
461
for (size_t i = 0 ; i < ev->Get ()->ResponseSz ; ++i) {
460
462
const auto & res = ev->Get ()->Responses [i];
461
- ProcessSingleRangeResult (blobRanges[i], readCookie, res.Status , res.Buffer .ConvertToString (), ctx);
463
+ ProcessSingleRangeResult (blobRanges[i], readCookie, res.Status , res.Buffer .ConvertToString (), detailedError, ctx);
462
464
}
463
465
464
466
MakeReadRequests (ctx);
465
467
}
466
468
467
469
void ProcessSingleRangeResult (const TBlobRange& blobRange, const ui64 readCookie,
468
- ui32 status, const TString& data, const TActorContext& ctx) noexcept
470
+ ui32 status, const TString& data, const TString& detailedError, const TActorContext& ctx) noexcept
469
471
{
470
472
AFL_DEBUG (NKikimrServices::BLOB_CACHE)(" ProcessSingleRangeResult" , blobRange);
471
473
auto readIt = OutstandingReads.find (blobRange);
@@ -500,7 +502,7 @@ class TBlobCache: public TActorBootstrapped<TBlobCache> {
500
502
AFL_DEBUG (NKikimrServices::BLOB_CACHE)(" ProcessSingleRangeResult" , blobRange)(" send_replies" , readIt->second .Waiting .size ());
501
503
// Send results to all waiters
502
504
for (const auto & to : readIt->second .Waiting ) {
503
- SendResult (to, blobRange, (NKikimrProto::EReplyStatus)status, data, ctx);
505
+ SendResult (to, blobRange, (NKikimrProto::EReplyStatus)status, data, detailedError, ctx);
504
506
}
505
507
506
508
OutstandingReads.erase (readIt);
@@ -525,7 +527,7 @@ class TBlobCache: public TActorBootstrapped<TBlobCache> {
525
527
526
528
for (size_t i = 0 ; i < blobRanges.size (); ++i) {
527
529
Y_ABORT_UNLESS (blobRanges[i].BlobId .GetTabletId () == tabletId);
528
- ProcessSingleRangeResult (blobRanges[i], readCookie, NKikimrProto::EReplyStatus::NOTREADY, {}, ctx);
530
+ ProcessSingleRangeResult (blobRanges[i], readCookie, NKikimrProto::EReplyStatus::NOTREADY, {}, {}, ctx);
529
531
}
530
532
}
531
533
0 commit comments