@@ -94,7 +94,6 @@ class TBlobStorageGroupPatchRequest : public TBlobStorageGroupRequestActor {
9494 bool IsGoodPatchedBlobId = false ;
9595 bool IsAllowedErasure = false ;
9696 bool IsSecured = false ;
97- bool IsAccelerated = false ;
9897 bool HasSlowVDisk = false ;
9998 bool IsContinuedVPatch = false ;
10099 bool IsMovedPatch = false ;
@@ -593,8 +592,7 @@ class TBlobStorageGroupPatchRequest : public TBlobStorageGroupRequestActor {
593592 PATCH_LOG (PRI_DEBUG, BS_PROXY_PATCH, BPPA09, " Start Moved strategy" ,
594593 (SentStarts, SentStarts));
595594 ScheduleWakeUp (StartTime, MovedPatchTag);
596- Become (&TThis::MovedPatchState);
597- TInstant movedPatchDeadline = Deadline;
595+ Become (&TBlobStorageGroupPatchRequest::MovedPatchState);
598596 IsMovedPatch = true ;
599597 ui32 subgroupIdx = 0 ;
600598
@@ -620,7 +618,7 @@ class TBlobStorageGroupPatchRequest : public TBlobStorageGroupRequestActor {
620618
621619 ui64 cookie = ((ui64)OriginalId.Hash () << 32 ) | PatchedId.Hash ();
622620 events.emplace_back (new TEvBlobStorage::TEvVMovedPatch (OriginalGroupId.GetRawId (), Info->GroupID .GetRawId (),
623- OriginalId, PatchedId, vDisk, false , cookie, movedPatchDeadline ));
621+ OriginalId, PatchedId, vDisk, false , cookie, Deadline ));
624622 events.back ()->Orbit = std::move (Orbit);
625623 for (ui64 diffIdx = 0 ; diffIdx < DiffCount; ++diffIdx) {
626624 auto &diff = Diffs[diffIdx];
@@ -660,7 +658,7 @@ class TBlobStorageGroupPatchRequest : public TBlobStorageGroupRequestActor {
660658
661659 void StartVPatch () {
662660 StageStart = TActivationContext::Now ();
663- Become (&TThis ::VPatchState);
661+ Become (&TBlobStorageGroupPatchRequest ::VPatchState);
664662 Info->PickSubgroup (OriginalId.Hash (), &VDisks, nullptr );
665663 ReceivedResponseFlags.assign (VDisks.size (), false );
666664 ErrorResponseFlags.assign (VDisks.size (), false );
@@ -864,23 +862,6 @@ class TBlobStorageGroupPatchRequest : public TBlobStorageGroupRequestActor {
864862 return true ;
865863 }
866864
867- void GetWorstPredictedDelaysNs (NKikimrBlobStorage::EVDiskQueueId queueId,
868- ui64 *outWorstNs, ui64 *outNextToWorstNs, i32 *outWorstSubgroupIdx) const {
869- *outWorstSubgroupIdx = -1 ;
870- *outWorstNs = 0 ;
871- *outNextToWorstNs = 0 ;
872- for (ui32 diskIdx = 0 ; diskIdx < VDisks.size (); ++diskIdx) {
873- ui64 predictedNs = GroupQueues->GetPredictedDelayNsByOrderNumber (diskIdx, queueId);;
874- if (predictedNs > *outWorstNs) {
875- *outNextToWorstNs = *outWorstNs;
876- *outWorstNs = predictedNs;
877- *outWorstSubgroupIdx = diskIdx;
878- } else if (predictedNs > *outNextToWorstNs) {
879- *outNextToWorstNs = predictedNs;
880- }
881- }
882- }
883-
884865 void Bootstrap () override {
885866 PATCH_LOG (PRI_DEBUG, BS_PROXY_PATCH, BPPA01, " Actor bootstrapped" );
886867 Schedule (TDuration::MicroSeconds (60'000'000 ), new TEvents::TEvWakeup (NeverTag));
@@ -927,15 +908,26 @@ class TBlobStorageGroupPatchRequest : public TBlobStorageGroupRequestActor {
927908 }
928909 }
929910
911+ void SetSlowDisks () {
912+ for (ui32 idx = 0 ; idx < SlowFlags.size (); ++idx) {
913+ SlowFlags[idx] = !ReceivedResponseFlags[idx] && !EmptyResponseFlags[idx] && !ErrorResponseFlags[idx];
914+ if (SlowFlags[idx]) {
915+ HasSlowVDisk = true ;
916+ }
917+ }
918+ }
919+
930920 template <ui64 ExpectedTag>
931921 void HandleWakeUp (TEvents::TEvWakeup::TPtr &ev) {
932922 PATCH_LOG (PRI_DEBUG, BS_PROXY_PATCH, BPPA36, " HandleWakeUp" ,
933923 (ExpectedTag, ToString (ExpectedTag)),
934924 (ReceivedTag, ToString (ev->Get ()->Tag )));
935925 if (ev->Get ()->Tag == ExpectedTag) {
926+ SetSlowDisks ();
936927 StartFallback ();
937928 }
938929 if (ev->Get ()->Tag == NeverTag) {
930+ SetSlowDisks ();
939931 StartFallback ();
940932 PATCH_LOG (PRI_DEBUG, BS_PROXY_PATCH, BPPA40, " Found NeverTag wake up" , (ExpectedTag, ToString (ExpectedTag)));
941933 }
@@ -947,9 +939,11 @@ class TBlobStorageGroupPatchRequest : public TBlobStorageGroupRequestActor {
947939 (ExpectedTag, ToString (expectedTag)),
948940 (ReceivedTag, ToString (ev->Get ()->Tag )));
949941 if (ev->Get ()->Tag == expectedTag) {
942+ SetSlowDisks ();
950943 StartFallback ();
951944 }
952945 if (ev->Get ()->Tag == NeverTag) {
946+ SetSlowDisks ();
953947 StartFallback ();
954948 PATCH_LOG (PRI_DEBUG, BS_PROXY_PATCH, BPPA41, " Found NeverTag wake up" , (ExpectedTag, ToString (expectedTag)));
955949 }
0 commit comments