Skip to content

Commit aa3b5f6

Browse files
authored
Merge e64195d into 0839dc3
2 parents 0839dc3 + e64195d commit aa3b5f6

File tree

7 files changed

+11
-18
lines changed

7 files changed

+11
-18
lines changed

ydb/core/blobstorage/dsproxy/dsproxy_get.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,11 +418,14 @@ class TBlobStorageGroupGetRequest : public TBlobStorageGroupRequestActor {
418418
(History, GetImpl.PrintHistory()));
419419
}
420420

421-
STLOG(GetImpl.WasNotOkResponses() && PopAllowToken(handleClass) ? PRI_NOTICE : PRI_DEBUG,
421+
auto resultStatusPriority = PriorityForStatusResult(evResult->Status);
422+
if (IS_LOG_PRIORITY_ENABLED(resultStatusPriority, LogCtx.LogComponent) && PopAllowToken(handleClass)) {
423+
STLOG(resultStatusPriority,
422424
BS_PROXY_GET, BPG72, "Query history",
423425
(GroupId, Info->GroupID),
424426
(HandleClass, NKikimrBlobStorage::EGetHandleClass_Name(handleClass)),
425427
(History, GetImpl.PrintHistory()));
428+
}
426429

427430
return SendResponseAndDie(std::unique_ptr<TEvBlobStorage::TEvGetResult>(evResult.Release()));
428431
}

ydb/core/blobstorage/dsproxy/dsproxy_get_impl.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,6 @@ class TGetImpl {
5454

5555
THistory History;
5656

57-
bool AtLeastOneResponseWasNotOk = false;
58-
5957
friend class TBlobStorageGroupGetRequest;
6058
friend class THistory;
6159

@@ -237,7 +235,6 @@ class TGetImpl {
237235
DSP_LOG_DEBUG_SX(logCtx, "BPG60", "Got# " << NKikimrProto::EReplyStatus_Name(replyStatus).data()
238236
<< " orderNumber# " << orderNumber << " vDiskId# " << vdisk.ToString());
239237
Blackboard.AddErrorResponse(blobId, orderNumber, record.GetErrorReason());
240-
AtLeastOneResponseWasNotOk = true;
241238
} else if (replyStatus == NKikimrProto::NOT_YET) {
242239
DSP_LOG_DEBUG_SX(logCtx, "BPG67", "Got# NOT_YET orderNumber# " << orderNumber
243240
<< " vDiskId# " << vdisk.ToString());
@@ -296,10 +293,6 @@ class TGetImpl {
296293
return History.Print((QuerySize == 0) ? nullptr : &Queries[0].Id);
297294
}
298295

299-
bool WasNotOkResponses() {
300-
return AtLeastOneResponseWasNotOk;
301-
}
302-
303296
protected:
304297
EStrategyOutcome RunBoldStrategy(TLogContext &logCtx);
305298
EStrategyOutcome RunMirror3dcStrategy(TLogContext &logCtx);

ydb/core/blobstorage/dsproxy/dsproxy_impl.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,11 @@ namespace NKikimr {
7474
case NKikimrProto::BLOCKED:
7575
case NKikimrProto::DEADLINE:
7676
case NKikimrProto::RACE:
77-
case NKikimrProto::ERROR:
7877
return NActors::NLog::EPriority::PRI_INFO;
7978
case NKikimrProto::NODATA:
8079
return NActors::NLog::EPriority::PRI_NOTICE;
80+
case NKikimrProto::ERROR:
81+
return NActors::NLog::EPriority::PRI_ERROR;
8182
default:
8283
return NActors::NLog::EPriority::PRI_ERROR;
8384
}

ydb/core/blobstorage/dsproxy/dsproxy_put.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -461,8 +461,8 @@ class TBlobStorageGroupPutRequest : public TBlobStorageGroupRequestActor {
461461
(History, PutImpl.PrintHistory()));
462462
}
463463

464-
if (ResponsesSent == PutImpl.Blobs.size()) {
465-
STLOG(PutImpl.WasNotOkResponses() && PopAllowToken(HandleClass) ? PRI_NOTICE : PRI_DEBUG,
464+
if (ResponsesSent == PutImpl.Blobs.size() && IS_LOG_PRIORITY_ENABLED(PutImpl.ResultPriority, LogCtx.LogComponent) && PopAllowToken(HandleClass)) {
465+
STLOG(PutImpl.ResultPriority,
466466
BS_PROXY_PUT, BPP72, "Query history",
467467
(GroupId, Info->GroupID),
468468
(HandleClass, NKikimrBlobStorage::EPutHandleClass_Name(HandleClass)),

ydb/core/blobstorage/dsproxy/dsproxy_put_impl.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ void TPutImpl::PrepareOneReply(NKikimrProto::EReplyStatus status, size_t blobIdx
7070
ev->ErrorReason = std::move(errorReason);
7171
const NLog::EPriority priority = GetPriorityForReply(Info->PutErrorMuteChecker, status);
7272
DSP_LOG_LOG_SX(logCtx, priority, "BPP12", "Result# " << ev->Print(false) << " GroupId# " << Info->GroupID);
73+
ResultPriority = std::min(ResultPriority, PriorityForStatusResult(status));
7374
outPutResults.emplace_back(blobIdx, std::move(ev));
7475
}
7576
}

ydb/core/blobstorage/dsproxy/dsproxy_put_impl.h

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class TPutImpl {
4040
ui32 VPutResponses = 0;
4141
ui32 VMultiPutRequests = 0;
4242
ui32 VMultiPutResponses = 0;
43-
bool AtLeastOneResponseWasNotOk = false;
43+
NActors::NLog::EPriority ResultPriority = NActors::NLog::PRI_DEBUG;
4444
bool EnableRequestMod3x3ForMinLatecy = false;
4545

4646
const TEvBlobStorage::TEvPut::ETactic Tactic;
@@ -299,10 +299,6 @@ class TPutImpl {
299299
return it->second;
300300
}
301301

302-
bool WasNotOkResponses() {
303-
return AtLeastOneResponseWasNotOk;
304-
}
305-
306302
protected:
307303
void RunStrategies(TLogContext &logCtx, TPutResultVec &outPutResults, const TBlobStorageGroupInfo::TGroupVDisks& expired,
308304
bool accelerate);
@@ -328,7 +324,6 @@ class TPutImpl {
328324
case NKikimrProto::VDISK_ERROR_STATE:
329325
case NKikimrProto::OUT_OF_SPACE:
330326
Blackboard.AddErrorResponse(blobId, orderNumber, record.GetErrorReason());
331-
AtLeastOneResponseWasNotOk = true;
332327
break;
333328
case NKikimrProto::OK:
334329
case NKikimrProto::ALREADY:

ydb/core/blobstorage/dsproxy/request_history.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ class THistory {
7373
<< " NodeId# " << info->GetActorId(OrderNumber).NodeId()
7474
<< " Status# " << NKikimrProto::EReplyStatus_Name(Status);
7575
if (ErrorReason) {
76-
str << "ErrorReason# \"" << ErrorReason << "\"";
76+
str << " ErrorReason# \"" << ErrorReason << "\"";
7777
}
7878
str << " }";
7979
}

0 commit comments

Comments
 (0)