Skip to content

Commit

Permalink
tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
sharpeye committed Sep 27, 2024
1 parent 937a4df commit 578f58a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -1163,7 +1163,7 @@ NProto::TError TDiskRegistryState::ReplaceDevice(

TDiskState& disk = Disks[diskId];

auto error = ReplaceDevice(
auto error = ReplaceDeviceWithoutDiskStateUpdate(
db,
disk,
diskId,
Expand All @@ -1182,7 +1182,7 @@ NProto::TError TDiskRegistryState::ReplaceDevice(
return {};
}

NProto::TError TDiskRegistryState::ReplaceDevice(
NProto::TError TDiskRegistryState::ReplaceDeviceWithoutDiskStateUpdate(
TDiskRegistryDatabase& db,
TDiskState& disk,
const TString& diskId,
Expand Down Expand Up @@ -4829,7 +4829,7 @@ void TDiskRegistryState::ApplyAgentStateChange(
deviceId);

if (canReplaceDevice) {
auto error = ReplaceDevice(
auto error = ReplaceDeviceWithoutDiskStateUpdate(
db,
disk,
diskId,
Expand Down Expand Up @@ -5757,7 +5757,7 @@ void TDiskRegistryState::ApplyDeviceStateChange(
device.GetDeviceUUID());

if (canReplaceDevice) {
auto error = ReplaceDevice(
auto error = ReplaceDeviceWithoutDiskStateUpdate(
db,
*disk,
diskId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1259,8 +1259,7 @@ class TDiskRegistryState
TResultOrError<TConfigUpdateEffect> 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,
Expand Down

0 comments on commit 578f58a

Please sign in to comment.