aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorshmel1k <shmel1k@ydb.tech>2023-11-10 00:04:40 +0300
committershmel1k <shmel1k@ydb.tech>2023-11-10 00:20:36 +0300
commit7dba44219edab2036c5dbd35e1d675c981ca0846 (patch)
treea0cda629478d925e9205f640f1d880c17277ccb5
parent89a4aec0d3a3f523ef4f4c4ff4d65f6bad29debf (diff)
downloadydb-7dba44219edab2036c5dbd35e1d675c981ca0846.tar.gz
improve invalid level begins logging in geometry info
-rw-r--r--ydb/core/mind/bscontroller/group_geometry_info.h19
1 files changed, 16 insertions, 3 deletions
diff --git a/ydb/core/mind/bscontroller/group_geometry_info.h b/ydb/core/mind/bscontroller/group_geometry_info.h
index 699fe43dd1..620fcd3c9d 100644
--- a/ydb/core/mind/bscontroller/group_geometry_info.h
+++ b/ydb/core/mind/bscontroller/group_geometry_info.h
@@ -49,8 +49,21 @@ namespace NKikimr::NBsController {
}
if (RealmLevelBegin || RealmLevelEnd || DomainLevelBegin || DomainLevelEnd) {
- if (RealmLevelEnd < RealmLevelBegin || DomainLevelEnd < DomainLevelBegin) {
- throw TExFitGroupError() << "XxxLevelBegin must be less than or equal to XxxLevelEnd";
+ TStringStream err;
+ bool needComma = false;
+ if (RealmLevelEnd < RealmLevelBegin) {
+ needComma = true;
+ err << "RealmLevelBegin = " << RealmLevelBegin << " must be less than or equal to RealmLevelEnd = " << RealmLevelEnd;
+ }
+ if (DomainLevelEnd < DomainLevelBegin) {
+ if (needComma) {
+ err << ", ";
+ }
+ err << "DomainLevelBegin = " << DomainLevelBegin
+ << " must be less than or equal to DomainLevelEnd = " << DomainLevelEnd;
+ }
+ if (!err.empty()) {
+ throw TExFitGroupError() << err.Str();
}
} else {
RealmLevelBegin = 10;
@@ -91,7 +104,7 @@ namespace NKikimr::NBsController {
for (const bool requireOperational : {true, false}) {
for (const auto& replacedDisk : misplacedVDisks.Disks) {
TPDiskId pdiskId = group[replacedDisk.FailRealm][replacedDisk.FailDomain][replacedDisk.VDisk];
- if (mapper.TargetMisplacedVDisk(groupId, group, replacedDisk, forbid, requiredSpace,
+ if (mapper.TargetMisplacedVDisk(groupId, group, replacedDisk, forbid, requiredSpace,
requireOperational, error)) {
return {replacedDisk, pdiskId};
}