Skip to content

Commit 47956f5

Browse files
committed
Make cooldown timeout on VDisk flexible
1 parent ed038e2 commit 47956f5

File tree

4 files changed

+10
-8
lines changed

4 files changed

+10
-8
lines changed

ydb/core/blobstorage/dsproxy/dsproxy_put.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ class TBlobStorageGroupPutRequest : public TBlobStorageGroupRequestActor<TBlobSt
138138
}
139139

140140
void HandleIncarnation(TMonotonic timestamp, ui32 orderNumber, ui64 incarnationGuid) {
141-
timestamp += TDuration::Seconds(15); // TODO: cooldown timeout
141+
timestamp += VDiskCooldownTimeoutOnProxy;
142142

143143
Y_ABORT_UNLESS(orderNumber < IncarnationRecords.size());
144144
auto& record = IncarnationRecords[orderNumber];

ydb/core/blobstorage/nodewarden/node_warden_vdisk.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66

77
namespace NKikimr::NStorage {
88

9-
constexpr TDuration PDISK_CONFIDENCE_DELAY = TDuration::Seconds(15);
10-
119
void TNodeWarden::DestroyLocalVDisk(TVDiskRecord& vdisk) {
1210
STLOG(PRI_INFO, BS_NODE, NW35, "DestroyLocalVDisk", (VDiskId, vdisk.GetVDiskId()), (VSlotId, vdisk.GetVSlotId()));
1311
Y_ABORT_UNLESS(!vdisk.RuntimeData);
@@ -296,7 +294,7 @@ namespace NKikimr::NStorage {
296294
StartLocalVDiskActor(record, TDuration::Zero());
297295
} else if (record.RuntimeData->DonorMode < record.Config.HasDonorMode() || record.RuntimeData->ReadOnly != record.Config.GetReadOnly()) {
298296
PoisonLocalVDisk(record);
299-
StartLocalVDiskActor(record, PDISK_CONFIDENCE_DELAY);
297+
StartLocalVDiskActor(record, VDiskCooldownTimeout);
300298
}
301299
}
302300

@@ -323,7 +321,7 @@ namespace NKikimr::NStorage {
323321
auto& record = it->second;
324322
if (record.GetVDiskId() == vDiskId) {
325323
PoisonLocalVDisk(record);
326-
StartLocalVDiskActor(record, PDISK_CONFIDENCE_DELAY);
324+
StartLocalVDiskActor(record, VDiskCooldownTimeout);
327325
break;
328326
}
329327
}

ydb/core/blobstorage/vdisk/localrecovery/localrecovery_public.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -596,7 +596,7 @@ namespace NKikimr {
596596
LOG_NOTICE(ctx, BS_LOCALRECOVERY,
597597
VDISKP(LocRecCtx->VCtx->VDiskLogPrefix, "LocalRecovery START"));
598598

599-
SendYardInit(ctx, Config->BaseInfo.YardInitDelay);
599+
SendYardInit(ctx, TDuration::Zero());
600600
Become(&TThis::StateInitialize, ctx, VDiskCooldownTimeout, new TEvents::TEvWakeup);
601601
VDiskMonGroup.VDiskLocalRecoveryState() = TDbMon::TDbLocalRecovery::YardInit;
602602
}

ydb/core/blobstorage/vdisk/syncer/blobstorage_syncer.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -297,11 +297,14 @@ namespace NKikimr {
297297
return;
298298
}
299299

300-
Become(&TThis::RecoverLostDataStateFunc);
300+
Become(&TThis::RecoverLostDataStateFunc, SyncerCtx->Config->BaseInfo.YardInitDelay, new TEvWakeup);
301+
Phase = TPhaseVal::PhaseRecoverLostData;
302+
}
303+
304+
void RecoverLostDataResumeAfterDelay(const TActorContext& ctx) {
301305
const TVDiskEternalGuid guid = GuidRecovOutcome->Guid;
302306
RecoverLostDataId = ctx.Register(CreateSyncerRecoverLostDataActor(SyncerCtx, GInfo, CommitterId, ctx.SelfID, guid));
303307
ActiveActors.Insert(RecoverLostDataId, __FILE__, __LINE__, ctx, NKikimrServices::BLOBSTORAGE);
304-
Phase = TPhaseVal::PhaseRecoverLostData;
305308
}
306309

307310
void Handle(TEvSyncerLostDataRecovered::TPtr &ev, const TActorContext &ctx) {
@@ -322,6 +325,7 @@ namespace NKikimr {
322325
HFunc(TEvents::TEvPoisonPill, HandlePoison)
323326
HFunc(TEvSublogLine, Handle)
324327
HFunc(TEvVGenerationChange, RecoverLostDataModeHandle)
328+
CFunc(TEvents::TSystem::Wakeup, RecoverLostDataResumeAfterDelay);
325329
)
326330

327331
////////////////////////////////////////////////////////////////////////

0 commit comments

Comments
 (0)