File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed
ydb/core/blobstorage/dsproxy Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -594,7 +594,7 @@ class TBlobStorageGroupPatchRequest : public TBlobStorageGroupRequestActor {
594
594
// ScheduleWakeUp(StartTime, MovedPatchTag);
595
595
Become (&TBlobStorageGroupPatchRequest::MovedPatchState);
596
596
IsMovedPatch = true ;
597
- ui32 subgroupIdx = 0 ;
597
+ std::optional< ui32> subgroupIdx = 0 ;
598
598
599
599
if (OkVDisksWithParts) {
600
600
ui32 okVDiskIdx = RandomNumber<ui32>(OkVDisksWithParts.size ());
@@ -615,13 +615,16 @@ class TBlobStorageGroupPatchRequest : public TBlobStorageGroupRequestActor {
615
615
goodDisks.push_back (idx);
616
616
}
617
617
}
618
- ui32 okVDiskIdx = RandomNumber<ui32> (goodDisks.size ());
619
- subgroupIdx = goodDisks[okVDiskIdx] ;
620
- } else {
621
- subgroupIdx = RandomNumber<ui32>(Info-> Type . TotalPartCount ());
618
+ if (goodDisks.size ()) {
619
+ ui32 okVDiskIdx = RandomNumber<ui32>( goodDisks. size ()) ;
620
+ subgroupIdx = goodDisks[okVDiskIdx];
621
+ }
622
622
}
623
623
}
624
- TVDiskID vDisk = Info->GetVDiskInSubgroup (subgroupIdx, OriginalId.Hash ());
624
+ if (!subgroupIdx) {
625
+ subgroupIdx = RandomNumber<ui32>(Info->Type .TotalPartCount ());
626
+ }
627
+ TVDiskID vDisk = Info->GetVDiskInSubgroup (*subgroupIdx, OriginalId.Hash ());
625
628
TDeque<std::unique_ptr<TEvBlobStorage::TEvVMovedPatch>> events;
626
629
627
630
ui64 cookie = ((ui64)OriginalId.Hash () << 32 ) | PatchedId.Hash ();
You can’t perform that action at this time.
0 commit comments