Skip to content

Commit 6639bbc

Browse files
va-kuznecovVlad Kuznecov
andauthored
Refactor LOG macroses in dsproxy (#8287)
Co-authored-by: Vlad Kuznecov <va-kuznecov@nebius.com>
1 parent 2848978 commit 6639bbc

22 files changed

+172
-206
lines changed

ydb/core/blobstorage/dsproxy/dsproxy_assimilate.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ class TBlobStorageGroupAssimilateRequest : public TBlobStorageGroupRequestActor
276276
}
277277

278278
void Bootstrap() override {
279-
A_LOG_INFO_S("BPA01", "bootstrap"
279+
DSP_LOG_INFO_S("BPA01", "bootstrap"
280280
<< " ActorId# " << SelfId()
281281
<< " Group# " << Info->GroupID
282282
<< " RestartCounter# " << RestartCounter);
@@ -289,7 +289,7 @@ class TBlobStorageGroupAssimilateRequest : public TBlobStorageGroupRequestActor
289289
}
290290

291291
void HandleWakeup() {
292-
A_LOG_NOTICE_S("BPA25", "assimilation is way too long");
292+
DSP_LOG_NOTICE_S("BPA25", "assimilation is way too long");
293293
}
294294

295295
STATEFN(StateWork) {
@@ -315,7 +315,7 @@ class TBlobStorageGroupAssimilateRequest : public TBlobStorageGroupRequestActor
315315
maxOpt(SkipBarriersUpTo, info.LastProcessedBarrier),
316316
maxOpt(SkipBlobsUpTo, info.LastProcessedBlob)), 0);
317317

318-
A_LOG_DEBUG_S("BPA03", "Request orderNumber# " << orderNumber << " VDiskId# " << Info->GetVDiskId(orderNumber));
318+
DSP_LOG_DEBUG_S("BPA03", "Request orderNumber# " << orderNumber << " VDiskId# " << Info->GetVDiskId(orderNumber));
319319

320320
++RequestsInFlight;
321321
}
@@ -328,7 +328,7 @@ class TBlobStorageGroupAssimilateRequest : public TBlobStorageGroupRequestActor
328328
const ui32 orderNumber = Info->GetTopology().GetOrderNumber(vdiskId);
329329
Y_ABORT_UNLESS(orderNumber < PerVDiskInfo.size());
330330

331-
A_LOG_DEBUG_S("BPA02", "Handle TEvVAssimilateResult"
331+
DSP_LOG_DEBUG_S("BPA02", "Handle TEvVAssimilateResult"
332332
<< " Status# " << NKikimrProto::EReplyStatus_Name(record.GetStatus())
333333
<< " ErrorReason# '" << record.GetErrorReason() << "'"
334334
<< " VDiskId# " << vdiskId
@@ -379,14 +379,14 @@ class TBlobStorageGroupAssimilateRequest : public TBlobStorageGroupRequestActor
379379
ReplyAndDie(NKikimrProto::ERROR);
380380
} else {
381381
// answer with what we have already collected
382-
A_LOG_DEBUG_S("BPA06", "SendResponseAndDie (no items to merge)");
382+
DSP_LOG_DEBUG_S("BPA06", "SendResponseAndDie (no items to merge)");
383383
SendResponseAndDie(std::move(Result));
384384
}
385385
return;
386386
}
387387
while (requests.empty()) {
388388
if (Heap.empty()) {
389-
A_LOG_DEBUG_S("BPA07", "SendResponseAndDie (heap empty)");
389+
DSP_LOG_DEBUG_S("BPA07", "SendResponseAndDie (heap empty)");
390390
SendResponseAndDie(std::move(Result));
391391
return;
392392
}
@@ -429,7 +429,7 @@ class TBlobStorageGroupAssimilateRequest : public TBlobStorageGroupRequestActor
429429
}
430430

431431
if (Result->Blocks.size() + Result->Barriers.size() + Result->Blobs.size() >= 10'000) {
432-
A_LOG_DEBUG_S("BPA05", "SendResponseAndDie (10k)");
432+
DSP_LOG_DEBUG_S("BPA05", "SendResponseAndDie (10k)");
433433
SendResponseAndDie(std::move(Result));
434434
} else {
435435
for (const ui32 orderNumber : requests) {
@@ -446,7 +446,7 @@ class TBlobStorageGroupAssimilateRequest : public TBlobStorageGroupRequestActor
446446
}
447447

448448
void ReplyAndDie(NKikimrProto::EReplyStatus status) override {
449-
A_LOG_DEBUG_S("BPA04", "ReplyAndDie status# " << NKikimrProto::EReplyStatus_Name(status));
449+
DSP_LOG_DEBUG_S("BPA04", "ReplyAndDie status# " << NKikimrProto::EReplyStatus_Name(status));
450450
for (const auto& item : PerVDiskInfo) {
451451
if (item.ErrorReason) {
452452
if (ErrorReason) {

ydb/core/blobstorage/dsproxy/dsproxy_block.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class TBlobStorageGroupBlockRequest : public TBlobStorageGroupRequestActor {
3838
// You can't call GetActorId before calling IsValidId
3939
Y_ABORT_UNLESS(Info->IsValidId(shortId), "Invalid VDiskId VDiskId# %s", shortId.ToString().c_str());
4040

41-
A_LOG_LOG_S(false, PriorityForStatusInbound(status), "DSPB01", "Handle TEvVBlockResult"
41+
DSP_LOG_LOG_S(PriorityForStatusInbound(status), "DSPB01", "Handle TEvVBlockResult"
4242
<< " status# " << NKikimrProto::EReplyStatus_Name(status).data()
4343
<< " From# " << vdisk.ToString()
4444
<< " NodeId# " << Info->GetActorId(vdisk).NodeId());
@@ -98,15 +98,15 @@ class TBlobStorageGroupBlockRequest : public TBlobStorageGroupRequestActor {
9898
void ReplyAndDie(NKikimrProto::EReplyStatus status) override {
9999
std::unique_ptr<TEvBlobStorage::TEvBlockResult> result(new TEvBlobStorage::TEvBlockResult(status));
100100
result->ErrorReason = ErrorReason;
101-
A_LOG_LOG_S(true, PriorityForStatusResult(status), "DSPB04", "Result# " << result->Print(false));
101+
DSP_LOG_LOG_S(PriorityForStatusResult(status), "DSPB04", "Result# " << result->Print(false));
102102
Mon->CountBlockResponseTime(TActivationContext::Now() - StartTime);
103103
return SendResponseAndDie(std::move(result));
104104
}
105105

106106
void SendBlockRequest(const TVDiskID& vdiskId) {
107107
const ui64 cookie = TVDiskIdShort(vdiskId).GetRaw();
108108

109-
A_LOG_DEBUG_S("DSPB03", "Sending TEvVBlock Tablet# " << TabletId
109+
DSP_LOG_DEBUG_S("DSPB03", "Sending TEvVBlock Tablet# " << TabletId
110110
<< " Generation# " << Generation
111111
<< " vdiskId# " << vdiskId
112112
<< " node# " << Info->GetActorId(vdiskId).NodeId());
@@ -143,7 +143,7 @@ class TBlobStorageGroupBlockRequest : public TBlobStorageGroupRequestActor {
143143
{}
144144

145145
void Bootstrap() override {
146-
A_LOG_DEBUG_S("DSPB05", "bootstrap"
146+
DSP_LOG_DEBUG_S("DSPB05", "bootstrap"
147147
<< " ActorId# " << SelfId()
148148
<< " Group# " << Info->GroupID
149149
<< " TabletId# " << TabletId

ydb/core/blobstorage/dsproxy/dsproxy_collect.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class TBlobStorageGroupCollectGarbageRequest : public TBlobStorageGroupRequestAc
4141
Y_ABORT_UNLESS(record.HasVDiskID());
4242
const TVDiskID vdisk = VDiskIDFromVDiskID(record.GetVDiskID());
4343

44-
A_LOG_LOG_S(false, PriorityForStatusInbound(status), "DSPC01", "received"
44+
DSP_LOG_LOG_S(PriorityForStatusInbound(status), "DSPC01", "received"
4545
<< " TEvVCollectGarbageResult# " << ev->Get()->ToString());
4646

4747
Process(status, vdisk, record.HasIncarnationGuid() ? std::make_optional(record.GetIncarnationGuid()) : std::nullopt);
@@ -110,7 +110,7 @@ class TBlobStorageGroupCollectGarbageRequest : public TBlobStorageGroupRequestAc
110110
auto result = std::make_unique<TEvBlobStorage::TEvCollectGarbageResult>(status, TabletId, RecordGeneration,
111111
PerGenerationCounter, Channel);
112112
result->ErrorReason = ErrorReason;
113-
A_LOG_LOG_S(true, status == NKikimrProto::OK ? NLog::PRI_INFO : NLog::PRI_NOTICE, "DSPC02", "Result# " << result->Print(false));
113+
DSP_LOG_LOG_S(status == NKikimrProto::OK ? NLog::PRI_INFO : NLog::PRI_NOTICE, "DSPC02", "Result# " << result->Print(false));
114114
SendResponseAndDie(std::move(result));
115115
}
116116

@@ -159,7 +159,7 @@ class TBlobStorageGroupCollectGarbageRequest : public TBlobStorageGroupRequestAc
159159
{}
160160

161161
void Bootstrap() override {
162-
A_LOG_INFO_S("DSPC03", "bootstrap"
162+
DSP_LOG_INFO_S("DSPC03", "bootstrap"
163163
<< " ActorId# " << SelfId()
164164
<< " Group# " << Info->GroupID
165165
<< " TabletId# " << TabletId
@@ -174,11 +174,11 @@ class TBlobStorageGroupCollectGarbageRequest : public TBlobStorageGroupRequestAc
174174
<< " RestartCounter# " << RestartCounter);
175175

176176
for (const auto& item : Keep ? *Keep : TVector<TLogoBlobID>()) {
177-
A_LOG_INFO_S("DSPC04", "Keep# " << item);
177+
DSP_LOG_INFO_S("DSPC04", "Keep# " << item);
178178
}
179179

180180
for (const auto& item : DoNotKeep ? *DoNotKeep : TVector<TLogoBlobID>()) {
181-
A_LOG_INFO_S("DSPC05", "DoNotKeep# " << item);
181+
DSP_LOG_INFO_S("DSPC05", "DoNotKeep# " << item);
182182
}
183183

184184
for (const auto& vdisk : Info->GetVDisks()) {

0 commit comments

Comments
 (0)