@@ -582,9 +582,9 @@ class TBlobStorageGroupPatchRequest : public TBlobStorageGroupRequestActor<TBlob
582582 GetWorstPredictedDelaysNs (NKikimrBlobStorage::EVDiskQueueId::PutAsyncBlob, &worstNs, &nextToWorstNs, &worstSubGroubIdx);
583583 if (worstNs * 2 > nextToWorstNs) {
584584 SlowFlags[worstSubGroubIdx] = true ;
585- Schedule (TDuration::MicroSeconds (nextToWorstNs * MovedPatchWaitingMultiplier / 1000 ), new TEvents::TEvWakeup (MovedPatchTag));
586- movedPatchDeadline = TActivationContext::Now () + TDuration::MicroSeconds (nextToWorstNs * MovedPatchWaitingMultiplier * 0.9 / 1000 );
587585 }
586+ Schedule (TDuration::MicroSeconds (nextToWorstNs * MovedPatchWaitingMultiplier / 1000 ), new TEvents::TEvWakeup (MovedPatchTag));
587+ movedPatchDeadline = TActivationContext::Now () + TDuration::MicroSeconds (nextToWorstNs * MovedPatchWaitingMultiplier * 0.9 / 1000 );
588588
589589 if (HasSlowVDisk) {
590590 TStackVec<ui32, TypicalDisksInSubring> goodDisks;
@@ -656,9 +656,9 @@ class TBlobStorageGroupPatchRequest : public TBlobStorageGroupRequestActor<TBlob
656656 GetWorstPredictedDelaysNs (NKikimrBlobStorage::EVDiskQueueId::GetFastRead, &worstNs, &nextToWorstNs, &worstSubGroubIdx);
657657 if (worstNs * 2 > nextToWorstNs) {
658658 SlowFlags[worstSubGroubIdx] = true ;
659- Schedule (TDuration::MicroSeconds (nextToWorstNs * VPatchStartWaitingMultiplier / 1000 ), new TEvents::TEvWakeup (VPatchStartTag));
660- vpatchStartDeadline = TActivationContext::Now () + TDuration::MicroSeconds (nextToWorstNs * VPatchStartWaitingMultiplier * 0.9 / 1000 );
661659 }
660+ Schedule (TDuration::MicroSeconds (nextToWorstNs * VPatchStartWaitingMultiplier / 1000 ), new TEvents::TEvWakeup (VPatchStartTag));
661+ vpatchStartDeadline = TActivationContext::Now () + TDuration::MicroSeconds (nextToWorstNs * (VPatchStartWaitingMultiplier + VPatchDiffWaitingMultiplier) * 0.9 / 1000 );
662662
663663 for (ui32 idx = 0 ; idx < VDisks.size (); ++idx) {
664664 if (!SlowFlags[idx]) {
@@ -776,9 +776,9 @@ class TBlobStorageGroupPatchRequest : public TBlobStorageGroupRequestActor<TBlob
776776 GetWorstPredictedDelaysNs (NKikimrBlobStorage::EVDiskQueueId::GetFastRead, &worstNs, &nextToWorstNs, &worstSubGroubIdx);
777777 if (worstNs * 2 > nextToWorstNs) {
778778 SlowFlags[worstSubGroubIdx] = true ;
779- Schedule (TDuration::MicroSeconds (nextToWorstNs * VPatchDiffWaitingMultiplier / 1000 ), new TEvents::TEvWakeup (VPatchDiffTag));
780- VPatchDiffDeadline = TActivationContext::Now () + TDuration::MicroSeconds (nextToWorstNs * VPatchDiffWaitingMultiplier * 0.9 / 1000 );
781779 }
780+ Schedule (TDuration::MicroSeconds (nextToWorstNs * VPatchDiffWaitingMultiplier / 1000 ), new TEvents::TEvWakeup (VPatchDiffTag));
781+ VPatchDiffDeadline = Min (Deadline, TActivationContext::Now () + TDuration::MicroSeconds (nextToWorstNs * VPatchDiffWaitingMultiplier * 0.9 / 1000 ));
782782
783783 if (Info->Type .GetErasure () == TErasureType::ErasureMirror3dc) {
784784 return ContinueVPatchForMirror3dc ();
0 commit comments