aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoralexvru <alexvru@ydb.tech>2023-07-27 18:41:14 +0300
committeralexvru <alexvru@ydb.tech>2023-07-27 18:41:14 +0300
commitf66b39282ffb375bfd204a8061579c0ed489247a (patch)
tree6faee630880d51c43de23965fb1dd8d13448b82e
parent154d4972020023e8b1c8bb3c060a87c1b43e38bc (diff)
downloadydb-f66b39282ffb375bfd204a8061579c0ed489247a.tar.gz
Fix PDiskConfig update for static disks KIKIMR-18883
-rw-r--r--ydb/core/mind/bscontroller/config_fit_pdisks.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/ydb/core/mind/bscontroller/config_fit_pdisks.cpp b/ydb/core/mind/bscontroller/config_fit_pdisks.cpp
index 0d5e0ab246..9e21ba3514 100644
--- a/ydb/core/mind/bscontroller/config_fit_pdisks.cpp
+++ b/ydb/core/mind/bscontroller/config_fit_pdisks.cpp
@@ -99,11 +99,10 @@ namespace NKikimr {
pdiskInfo->ReadCentric = disk.ReadCentric;
pdiskInfo->BoxId = disk.BoxId;
if (pdiskInfo->PDiskConfig != disk.PDiskConfig) {
- // update PDiskConfig only for nonstatic PDisks
- if (!NKikimr::NBsController::FindStaticPDisk(disk, state)) {
- pdiskInfo->PDiskConfig = disk.PDiskConfig;
+ if (const auto id = FindStaticPDisk(disk, state); id && state.StaticPDisks.at(*id).PDiskConfig != disk.PDiskConfig) {
+ throw TExError() << "PDiskConfig mismatch for static disk" << TErrorParams::NodeId(disk.NodeId) << TErrorParams::Path(disk.Path);
} else {
- throw TExError() << "Skipping PDiskConfig update for static disk" << TErrorParams::NodeId(disk.NodeId) << TErrorParams::Path(disk.Path);
+ pdiskInfo->PDiskConfig = disk.PDiskConfig;
}
}
// run ExtractConfig as the very last step