Skip to content

Commit a34c2eb

Browse files
committed
TODOs
1 parent d667bb7 commit a34c2eb

File tree

9 files changed

+40
-24
lines changed

9 files changed

+40
-24
lines changed

ydb/core/blobstorage/vdisk/common/vdisk_response.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ void SendVDiskResponse(const TActorContext &ctx, const TActorId &recipient, IEve
3131
UpdateMonOOSStatus(item.GetStatusFlags(), monGroup);
3232
}
3333
}
34-
34+
3535
switch (const ui32 type = ev->Type()) {
3636
#define HANDLE_EVENT(T) \
3737
case TEvBlobStorage::T::EventType: { \

ydb/core/blobstorage/vdisk/query/query_public.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ namespace NKikimr {
158158
LOG_DEBUG(ctx, NKikimrServices::BS_VDISK_OTHER,
159159
VDISKP(vctx->VDiskLogPrefix,
160160
"TEvVDbStatResult: %s", result->ToString().data()));
161-
SendVDiskResponse(ctx, ev->Sender, result.release(), ev->Cookie, "", nullptr); // TODO
161+
SendVDiskResponse(ctx, ev->Sender, result.release(), ev->Cookie, vctx->VDiskLogPrefix, vctx->OOSMonGroup);
162162
}
163163

164164
template <class TKey, class TMemRec>

ydb/core/blobstorage/vdisk/repl/blobstorage_repl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -554,7 +554,7 @@ namespace NKikimr {
554554
std::set<TActorId> DonorQueryActors;
555555

556556
void Handle(TEvBlobStorage::TEvEnrichNotYet::TPtr ev) {
557-
DonorQueryActors.insert(Register(new TDonorQueryActor(*ev->Get(), Donors)));
557+
DonorQueryActors.insert(Register(new TDonorQueryActor(*ev->Get(), Donors, ReplCtx->VCtx->VDiskLogPrefix, ReplCtx->VCtx->OOSMonGroup)));
558558
}
559559

560560
void Handle(TEvents::TEvActorDied::TPtr ev) {

ydb/core/blobstorage/vdisk/repl/query_donor.h

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,19 @@ namespace NKikimr {
1212
TActorId ParentId;
1313
std::deque<std::pair<TVDiskID, TActorId>> Donors;
1414
TDynBitMap UnresolvedItems;
15+
TString VDiskLogPrefix;
16+
std::shared_ptr<NMonGroup::TOutOfSpaceGroup> OOSMonGroup;
1517

1618
public:
17-
TDonorQueryActor(TEvBlobStorage::TEvEnrichNotYet& msg, std::deque<std::pair<TVDiskID, TActorId>> donors)
19+
TDonorQueryActor(TEvBlobStorage::TEvEnrichNotYet& msg, std::deque<std::pair<TVDiskID, TActorId>> donors,
20+
const TString& vDiskLogPrefix, std::shared_ptr<NMonGroup::TOutOfSpaceGroup> monGroup)
1821
: Query(msg.Query->Release().Release())
1922
, Sender(msg.Query->Sender)
2023
, Cookie(msg.Query->Cookie)
2124
, Result(std::move(msg.Result))
2225
, Donors(std::move(donors))
26+
, VDiskLogPrefix(vDiskLogPrefix)
27+
, OOSMonGroup(std::move(monGroup))
2328
{
2429
Y_ABORT_UNLESS(!Query->Record.HasRangeQuery());
2530
}
@@ -108,7 +113,7 @@ namespace NKikimr {
108113
void PassAway() override {
109114
LOG_DEBUG_S(*TlsActivationContext, NKikimrServices::BS_VDISK_GET, SelfId() << " finished query");
110115
Send(ParentId, new TEvents::TEvActorDied);
111-
SendVDiskResponse(TActivationContext::AsActorContext(), Sender, Result.release(), Cookie, "", nullptr); // TODO
116+
SendVDiskResponse(TActivationContext::AsActorContext(), Sender, Result.release(), Cookie, VDiskLogPrefix, OOSMonGroup);
112117
TActorBootstrapped::PassAway();
113118
}
114119

ydb/core/blobstorage/vdisk/skeleton/blobstorage_skeleton.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1360,7 +1360,7 @@ namespace NKikimr {
13601360

13611361
void Handle(TEvHullCompactResult::TPtr &ev, const TActorContext &ctx) {
13621362
Y_ABORT_UNLESS(VDiskCompactionState);
1363-
VDiskCompactionState->Compacted(ctx, ev->Get()->RequestId, ev->Get()->Type);
1363+
VDiskCompactionState->Compacted(ctx, ev->Get()->RequestId, ev->Get()->Type, VCtx->VDiskLogPrefix, VCtx->OOSMonGroup);
13641364
}
13651365

13661366
////////////////////////////////////////////////////////////////////////

ydb/core/blobstorage/vdisk/skeleton/skeleton_compactionstate.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@ namespace NKikimr {
5454
void TVDiskCompactionState::Compacted(
5555
const TActorContext &ctx,
5656
i64 reqId,
57-
EHullDbType dbType) {
57+
EHullDbType dbType,
58+
const TString& vDiskLogPrefix,
59+
std::shared_ptr<NMonGroup::TOutOfSpaceGroup> monGroup) {
5860
auto it = Requests.find(reqId);
5961
Y_ABORT_UNLESS(it != Requests.end());
6062
auto &req = it->second;
@@ -67,7 +69,7 @@ namespace NKikimr {
6769
}
6870

6971
if (req.AllDone()) {
70-
SendVDiskResponse(ctx, req.ClientId, req.Reply.release(), req.ClientCookie, "", nullptr); // TODO
72+
SendVDiskResponse(ctx, req.ClientId, req.Reply.release(), req.ClientCookie, vDiskLogPrefix, monGroup);
7173
// delete req from Request, we handled it
7274
Requests.erase(it);
7375
}

ydb/core/blobstorage/vdisk/skeleton/skeleton_compactionstate.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
#include "defs.h"
44
#include <ydb/core/blobstorage/vdisk/common/vdisk_private_events.h>
55
#include <ydb/core/blobstorage/vdisk/common/vdisk_dbtype.h>
6+
#include <ydb/core/blobstorage/vdisk/common/vdisk_mongroups.h>
67

78
namespace NKikimr {
89

@@ -24,7 +25,8 @@ namespace NKikimr {
2425
// setup input compaction request
2526
void Setup(const TActorContext &ctx, std::optional<ui64> lsn, TCompactionReq cState);
2627
// when hull db reports compaction finish we change state by calling this function
27-
void Compacted(const TActorContext &ctx, i64 reqId, EHullDbType dbType);
28+
void Compacted(const TActorContext &ctx, i64 reqId, EHullDbType dbType,
29+
const TString& vDiskLogPrefix, std::shared_ptr<NMonGroup::TOutOfSpaceGroup> monGroup);
2830
// when data is flushed to recovery log run compaction
2931
void Logged(const TActorContext &ctx, ui64 lsn) {
3032
if (Triggered && lsn >= LsnToCommit) {

ydb/core/blobstorage/vdisk/skeleton/skeleton_loggedrec.cpp

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ namespace NKikimr {
4848
<< " Marker# BSVSLR01");
4949

5050
Span.EndOk();
51-
SendVDiskResponse(ctx, Recipient, Result.release(), RecipientCookie, "", nullptr);
51+
const auto& vCtx = hull.GetHullCtx()->VCtx;
52+
SendVDiskResponse(ctx, Recipient, Result.release(), RecipientCookie, vCtx->VDiskLogPrefix, vCtx->OOSMonGroup);
5253
}
5354

5455
NWilson::TTraceId TLoggedRecVPut::GetTraceId() const {
@@ -124,7 +125,8 @@ namespace NKikimr {
124125
<< "TEvVPut: realtime# false result# " << msg->Result->ToString()
125126
<< " Marker# BSVSLR03");
126127
Span.EndOk();
127-
SendVDiskResponse(ctx, msg->OrigClient, msg->Result.release(), msg->OrigCookie, "", nullptr); // TODO
128+
const auto& vCtx = hull.GetHullCtx()->VCtx;
129+
SendVDiskResponse(ctx, msg->OrigClient, msg->Result.release(), msg->OrigCookie, vCtx->VDiskLogPrefix, vCtx->OOSMonGroup);
128130
}
129131

130132
///////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -149,16 +151,17 @@ namespace NKikimr {
149151
{}
150152

151153
void TLoggedRecVBlock::Replay(THull &hull, const TActorContext &ctx) {
152-
auto replySender = [&ctx] (const TActorId &id, ui64 cookie, NWilson::TTraceId, IEventBase *msg) {
153-
SendVDiskResponse(ctx, id, msg, cookie, "", nullptr); // TODO
154+
const auto& vCtx = hull.GetHullCtx()->VCtx;
155+
auto replySender = [&ctx, &vCtx] (const TActorId &id, ui64 cookie, NWilson::TTraceId, IEventBase *msg) {
156+
SendVDiskResponse(ctx, id, msg, cookie, vCtx->VDiskLogPrefix, vCtx->OOSMonGroup);
154157
};
155158

156159
hull.AddBlockCmd(ctx, TabletId, Gen, IssuerGuid, Seg.Point(), replySender);
157160

158161
LOG_DEBUG_S(ctx, NKikimrServices::BS_VDISK_BLOCK, hull.GetHullCtx()->VCtx->VDiskLogPrefix
159162
<< "TEvVBlock: result# " << Result->ToString()
160163
<< " Marker# BSVSLR04");
161-
SendVDiskResponse(ctx, Recipient, Result.release(), RecipientCookie, "", nullptr); // TODO
164+
SendVDiskResponse(ctx, Recipient, Result.release(), RecipientCookie, vCtx->VDiskLogPrefix, vCtx->OOSMonGroup);
162165
}
163166

164167
///////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -185,7 +188,8 @@ namespace NKikimr {
185188
<< "TEvVCollectGarbage: result# " << Result->ToString()
186189
<< " Marker# BSVSLR05");
187190
Span.EndOk();
188-
SendVDiskResponse(ctx, OrigEv->Sender, Result.release(), OrigEv->Cookie, "", nullptr); // TODO
191+
const auto& vCtx = hull.GetHullCtx()->VCtx;
192+
SendVDiskResponse(ctx, OrigEv->Sender, Result.release(), OrigEv->Cookie, vCtx->VDiskLogPrefix, vCtx->OOSMonGroup);
189193
}
190194

191195
///////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -203,17 +207,18 @@ namespace NKikimr {
203207
{}
204208

205209
void TLoggedRecLocalSyncData::Replay(THull &hull, const TActorContext &ctx) {
206-
auto replySender = [&ctx] (const TActorId &id, ui64 cookie, NWilson::TTraceId, IEventBase *msg) {
207-
SendVDiskResponse(ctx, id, msg, cookie, "", nullptr); // TODO
210+
const auto& vCtx = hull.GetHullCtx()->VCtx;
211+
auto replySender = [&ctx, &vCtx] (const TActorId &id, ui64 cookie, NWilson::TTraceId, IEventBase *msg) {
212+
SendVDiskResponse(ctx, id, msg, cookie, vCtx->VDiskLogPrefix, vCtx->OOSMonGroup);
208213
};
209214

210215
#ifdef UNPACK_LOCALSYNCDATA
211216
hull.AddSyncDataCmd(ctx, std::move(OrigEv->Get()->Extracted), Seg, replySender);
212217
#else
213218
hull.AddSyncDataCmd(ctx, OrigEv->Get()->Data, Seg, replySender);
214219
#endif
215-
Span.EndOk();
216-
SendVDiskResponse(ctx, OrigEv->Sender, Result.release(), OrigEv->Cookie, "", nullptr); // TODO
220+
Span.EndOk();
221+
SendVDiskResponse(ctx, OrigEv->Sender, Result.release(), OrigEv->Cookie, vCtx->VDiskLogPrefix, vCtx->OOSMonGroup);
217222
}
218223

219224
///////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -233,7 +238,8 @@ namespace NKikimr {
233238

234239
void TLoggedRecAnubisOsirisPut::Replay(THull &hull, const TActorContext &ctx) {
235240
hull.AddAnubisOsirisLogoBlob(ctx, Insert.Id, Insert.Ingress, Seg);
236-
SendVDiskResponse(ctx, OrigEv->Sender, Result.release(), OrigEv->Cookie, "", nullptr); // TODO
241+
const auto& vCtx = hull.GetHullCtx()->VCtx;
242+
SendVDiskResponse(ctx, OrigEv->Sender, Result.release(), OrigEv->Cookie, vCtx->VDiskLogPrefix, vCtx->OOSMonGroup);
237243
}
238244

239245
///////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -270,8 +276,8 @@ namespace NKikimr {
270276
{}
271277

272278
void TLoggedRecDelLogoBlobDataSyncLog::Replay(THull &hull, const TActorContext &ctx) {
273-
Y_UNUSED(hull);
274-
SendVDiskResponse(ctx, Recipient, Result.release(), RecipientCookie, "", nullptr); // TODO
279+
const auto& vCtx = hull.GetHullCtx()->VCtx;
280+
SendVDiskResponse(ctx, Recipient, Result.release(), RecipientCookie, vCtx->VDiskLogPrefix, vCtx->OOSMonGroup);
275281
}
276282

277283
///////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -287,7 +293,8 @@ namespace NKikimr {
287293

288294
void TLoggedRecAddBulkSst::Replay(THull &hull, const TActorContext &ctx) {
289295
hull.AddBulkSst(ctx, OrigEv->Get()->Essence, Seg);
290-
SendVDiskResponse(ctx, OrigEv->Sender, new TEvAddBulkSstResult, OrigEv->Cookie, "", nullptr); // TODO
296+
const auto& vCtx = hull.GetHullCtx()->VCtx;
297+
SendVDiskResponse(ctx, OrigEv->Sender, new TEvAddBulkSstResult, OrigEv->Cookie, vCtx->VDiskLogPrefix, vCtx->OOSMonGroup);
291298
}
292299

293300
///////////////////////////////////////////////////////////////////////////////////////////////////////

ydb/core/blobstorage/vdisk/skeleton/skeleton_vpatch_actor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ namespace NKikimr::NPrivate {
236236
AddMark((FoundOriginalParts.size() ? "Found parts" : "Parts were not found"));
237237
CurrentEventTrace = nullptr;
238238
#endif
239-
SendVDiskResponse(TActivationContext::AsActorContext(), Sender, FoundPartsEvent.release(), Cookie, VDiskLogPrefix, MonGroup); // TODO
239+
SendVDiskResponse(TActivationContext::AsActorContext(), Sender, FoundPartsEvent.release(), Cookie, VDiskLogPrefix, MonGroup);
240240
}
241241

242242
void PullOriginalPart(ui64 pullingPart) {

0 commit comments

Comments
 (0)