diff options
author | yuryalekseev <yuryalekseev@yandex-team.com> | 2023-02-22 08:47:29 +0300 |
---|---|---|
committer | yuryalekseev <yuryalekseev@yandex-team.com> | 2023-02-22 08:47:29 +0300 |
commit | 28af7d9f4e9dd9d411ea08d3bf49a045149d1c74 (patch) | |
tree | 31e6faf66d6385978feaf633918f9b8e5c1746f5 | |
parent | 66b69f707921d03a1bf8118c29326ffec2dbed4b (diff) | |
download | ydb-28af7d9f4e9dd9d411ea08d3bf49a045149d1c74.tar.gz |
Throw on error (address review comments).
-rw-r--r-- | ydb/core/mind/bscontroller/config_fit_pdisks.cpp | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/ydb/core/mind/bscontroller/config_fit_pdisks.cpp b/ydb/core/mind/bscontroller/config_fit_pdisks.cpp index 089dc98359d..a04a428fa18 100644 --- a/ydb/core/mind/bscontroller/config_fit_pdisks.cpp +++ b/ydb/core/mind/bscontroller/config_fit_pdisks.cpp @@ -222,25 +222,20 @@ namespace NKikimr { } if (serial.Serial.empty()) { - STLOG(PRI_ERROR, BS_CONTROLLER, BSCFP04, "Missing disks's serial number"); - return true; + throw TExError() << "Missing disks's serial number"; } auto nodeId = driveInfo.NodeId; if (!nodeId) { - STLOG(PRI_ERROR, BS_CONTROLLER, BSCFP05, "Empty node id for disk with serial number.", (SerialNumber, serial.Serial)); - return true; + throw TExError() << "Empty node id for disk with serial number " << TErrorParams::DiskSerialNumber(serial.Serial); } auto hostId = state.HostRecords->GetHostId(*nodeId); if (!hostId) { - STLOG(PRI_ERROR, BS_CONTROLLER, BSCFP06, "Couldn't find host id for node.", (NodeId, *nodeId)); - return true; + throw TExError() << "Couldn't find host id for node " << TErrorParams::NodeId(*nodeId); } - auto path = driveInfo.Path; if (!path) { - STLOG(PRI_ERROR, BS_CONTROLLER, BSCFP07, "Couldn't get path for disk with serial number.", (SerialNumber, serial.Serial)); - return true; + throw TExError() << "Couldn't get path for disk with serial number " << TErrorParams::DiskSerialNumber(serial.Serial); } TDiskInfo disk; |