From 578f58aca28eda4fa8bf2efaeb8ae64200faa688 Mon Sep 17 00:00:00 2001 From: sharpeye Date: Fri, 27 Sep 2024 09:30:29 +0000 Subject: [PATCH] tweak --- .../libs/storage/disk_registry/disk_registry_state.cpp | 10 +++++----- .../libs/storage/disk_registry/disk_registry_state.h | 3 +-- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/cloud/blockstore/libs/storage/disk_registry/disk_registry_state.cpp b/cloud/blockstore/libs/storage/disk_registry/disk_registry_state.cpp index 597ddcd0b8..8138cab6ad 100644 --- a/cloud/blockstore/libs/storage/disk_registry/disk_registry_state.cpp +++ b/cloud/blockstore/libs/storage/disk_registry/disk_registry_state.cpp @@ -1149,7 +1149,7 @@ NProto::TError TDiskRegistryState::ReplaceDevice( bool manual, bool* diskStateUpdated) { - Y_DEBUG_ABORT_UNLESS(diskStateUpdated); + Y_ABORT_UNLESS(diskStateUpdated); *diskStateUpdated = false; if (!diskId) { @@ -1163,7 +1163,7 @@ NProto::TError TDiskRegistryState::ReplaceDevice( TDiskState& disk = Disks[diskId]; - auto error = ReplaceDevice( + auto error = ReplaceDeviceWithoutDiskStateUpdate( db, disk, diskId, @@ -1182,7 +1182,7 @@ NProto::TError TDiskRegistryState::ReplaceDevice( return {}; } -NProto::TError TDiskRegistryState::ReplaceDevice( +NProto::TError TDiskRegistryState::ReplaceDeviceWithoutDiskStateUpdate( TDiskRegistryDatabase& db, TDiskState& disk, const TString& diskId, @@ -4829,7 +4829,7 @@ void TDiskRegistryState::ApplyAgentStateChange( deviceId); if (canReplaceDevice) { - auto error = ReplaceDevice( + auto error = ReplaceDeviceWithoutDiskStateUpdate( db, disk, diskId, @@ -5757,7 +5757,7 @@ void TDiskRegistryState::ApplyDeviceStateChange( device.GetDeviceUUID()); if (canReplaceDevice) { - auto error = ReplaceDevice( + auto error = ReplaceDeviceWithoutDiskStateUpdate( db, *disk, diskId, diff --git a/cloud/blockstore/libs/storage/disk_registry/disk_registry_state.h b/cloud/blockstore/libs/storage/disk_registry/disk_registry_state.h index f12e015639..38374bf4a2 100644 --- a/cloud/blockstore/libs/storage/disk_registry/disk_registry_state.h +++ b/cloud/blockstore/libs/storage/disk_registry/disk_registry_state.h @@ -1259,8 +1259,7 @@ class TDiskRegistryState TResultOrError CalcConfigUpdateEffect( const NProto::TDiskRegistryConfig& newConfig) const; - // Replace disk's device. No disk status update. - NProto::TError ReplaceDevice( + NProto::TError ReplaceDeviceWithoutDiskStateUpdate( TDiskRegistryDatabase& db, TDiskState& disk, const TString& diskId,