@@ -87,6 +87,9 @@ namespace NBalancing {
87
87
// /////////////////////////////////////////////////////////////////////////////////////////
88
88
89
89
void ContinueBalancing () {
90
+ Ctx->MonGroup .PlannedToSendOnMain () = SendOnMainParts.Data .size ();
91
+ Ctx->MonGroup .CandidatesToDelete () = TryDeleteParts.Data .size ();
92
+
90
93
if (SendOnMainParts.Empty () && TryDeleteParts.Empty ()) {
91
94
// no more parts to send or delete
92
95
STLOG (PRI_INFO, BS_VDISK_BALANCING, BSVB03, VDISKP (Ctx->VCtx , " Balancing completed" ));
@@ -101,8 +104,6 @@ namespace NBalancing {
101
104
102
105
void ScheduleJobQuant () {
103
106
Ctx->MonGroup .ReplTokenAquired ()++;
104
- Ctx->MonGroup .PlannedToSendOnMain () = SendOnMainParts.Data .size ();
105
- Ctx->MonGroup .CandidatesToDelete () = TryDeleteParts.Data .size ();
106
107
107
108
// once repl token received, start balancing - waking up sender and deleter
108
109
STLOG (PRI_INFO, BS_VDISK_BALANCING, BSVB02, VDISKP (Ctx->VCtx , " Schedule job quant" ),
@@ -128,16 +129,21 @@ namespace NBalancing {
128
129
THPTimer timer;
129
130
130
131
for (ui32 cnt = 0 ; It.Valid (); It.Next (), ++cnt) {
131
- if (cnt % 100 == 99 && TDuration::Seconds (timer.Passed ()) > JOB_GRANULARITY) {
132
+ if (cnt % 128 == 127 && TDuration::Seconds (timer.Passed ()) > JOB_GRANULARITY) {
132
133
// actor should not block the thread for a long time, so we should yield
133
- // STLOG(PRI_DEBUG, BS_VDISK_BALANCING, BSVB04, VDISKP(Ctx->VCtx, "Collect keys"), (collected, cnt), (passed, timer.Passed()));
134
+ STLOG (PRI_DEBUG, BS_VDISK_BALANCING, BSVB04, VDISKP (Ctx->VCtx , " Collect keys" ), (collected, cnt), (passed, timer.Passed ()));
134
135
Send (SelfId (), new NActors::TEvents::TEvWakeup ());
135
136
return ;
136
137
}
137
138
138
139
const auto & top = GInfo->GetTopology ();
139
140
const auto & key = It.GetCurKey ().LogoBlobID ();
140
141
142
+ if (BALANCE_ONLY_HUGE_BLOBS && !Ctx->HugeBlobCtx ->IsHugeBlob (GInfo->Type , key, Ctx->MinREALHugeBlobInBytes )) {
143
+ // skip non huge blobs
144
+ continue ;
145
+ }
146
+
141
147
TPartsCollectorMerger merger (top.GType );
142
148
It.PutToMerger (&merger);
143
149
@@ -197,6 +203,7 @@ namespace NBalancing {
197
203
Send (MakeBlobStorageReplBrokerID (), new TEvReleaseReplToken);
198
204
STLOG (PRI_INFO, BS_VDISK_BALANCING, BSVB04, VDISKP (Ctx->VCtx , " Epoch timeout" ));
199
205
PassAway ();
206
+ return ;
200
207
}
201
208
202
209
if (BatchManager.IsBatchCompleted ()) {
@@ -242,8 +249,8 @@ namespace NBalancing {
242
249
243
250
void Handle (NActors::TEvents::TEvUndelivered::TPtr ev) {
244
251
if (ev.Get ()->Type == TEvReplToken::EventType) {
245
- STLOG (PRI_WARN , BS_VDISK_BALANCING, BSVB06, VDISKP (Ctx->VCtx , " Ask repl token msg not delivered" ), (SelfId, SelfId ()), (PDiskId, Ctx->VDiskCfg ->BaseInfo .PDiskId ));
246
- ScheduleJobQuant ();
252
+ STLOG (PRI_ERROR , BS_VDISK_BALANCING, BSVB06, VDISKP (Ctx->VCtx , " Ask repl token msg not delivered" ), (SelfId, SelfId ()), (PDiskId, Ctx->VDiskCfg ->BaseInfo .PDiskId ));
253
+ ContinueBalancing ();
247
254
}
248
255
}
249
256
0 commit comments