diff options
author | serg-belyakov <serg-belyakov@yandex-team.com> | 2023-06-23 15:56:49 +0300 |
---|---|---|
committer | serg-belyakov <serg-belyakov@yandex-team.com> | 2023-06-23 15:56:49 +0300 |
commit | cc52bb3da65301318cbaf8fbb6609ef6d5e3cf68 (patch) | |
tree | 099d69ce980953848442a7b927e34147664e36df | |
parent | 946e3fceb61ca8aea25cc61c39c3d34a60c508fe (diff) | |
download | ydb-cc52bb3da65301318cbaf8fbb6609ef6d5e3cf68.tar.gz |
Rename BottomLimit to LowerLimit,
Rename BottomLimit
-rw-r--r-- | ydb/core/actorlib_impl/test_interconnect_ut.cpp | 12 | ||||
-rw-r--r-- | ydb/core/driver_lib/version/ut/version_ut.cpp | 48 | ||||
-rw-r--r-- | ydb/core/driver_lib/version/version.cpp | 4 | ||||
-rw-r--r-- | ydb/core/driver_lib/version/version.h | 6 | ||||
-rw-r--r-- | ydb/core/protos/config.proto | 2 |
5 files changed, 36 insertions, 36 deletions
diff --git a/ydb/core/actorlib_impl/test_interconnect_ut.cpp b/ydb/core/actorlib_impl/test_interconnect_ut.cpp index f8c56d0042..527bb50c89 100644 --- a/ydb/core/actorlib_impl/test_interconnect_ut.cpp +++ b/ydb/core/actorlib_impl/test_interconnect_ut.cpp @@ -769,9 +769,9 @@ Y_UNIT_TEST_SUITE(TInterconnectTest) { nbsRule->SetBuild("nbs"); nbsRule->SetComponentId((ui32)NKikimrConfig::TCompatibilityRule::Interconnect); - auto* bottomLimit = nbsRule->MutableBottomLimit(); - bottomLimit->SetYear(22); - bottomLimit->SetMajor(4); + auto* lowerLimit = nbsRule->MutableLowerLimit(); + lowerLimit->SetYear(22); + lowerLimit->SetMajor(4); nbsRule->MutableUpperLimit()->CopyFrom(*version); @@ -798,9 +798,9 @@ Y_UNIT_TEST_SUITE(TInterconnectTest) { auto* rule = node0->AddCanLoadFrom(); rule->SetComponentId((ui32)NKikimrConfig::TCompatibilityRule::Interconnect); - auto* bottomLimit = rule->MutableBottomLimit(); - bottomLimit->SetYear(22); - bottomLimit->SetMajor(5); + auto* lowerLimit = rule->MutableLowerLimit(); + lowerLimit->SetYear(22); + lowerLimit->SetMajor(5); rule->MutableUpperLimit()->CopyFrom(*version); diff --git a/ydb/core/driver_lib/version/ut/version_ut.cpp b/ydb/core/driver_lib/version/ut/version_ut.cpp index cafe9e0e6e..4bda2bba84 100644 --- a/ydb/core/driver_lib/version/ut/version_ut.cpp +++ b/ydb/core/driver_lib/version/ut/version_ut.cpp @@ -181,7 +181,7 @@ Y_UNIT_TEST_SUITE(YdbVersion) { .YdbVersion = TYdbVersion{ .Year = 1, .Major = 2, .Minor = 1, .Hotfix = 0 }, .CanLoadFrom = { TCompatibilityRule{ - .BottomLimit = TYdbVersion{ .Year = 1, .Major = 1 }, + .LowerLimit = TYdbVersion{ .Year = 1, .Major = 1 }, .UpperLimit = TYdbVersion{ .Year = 1, .Major = 1, .Minor = 3 }, .Forbidden = true } @@ -205,7 +205,7 @@ Y_UNIT_TEST_SUITE(YdbVersion) { .YdbVersion = TYdbVersion{ .Year = 1, .Major = 2, .Minor = 2, .Hotfix = 0 }, .StoresReadableBy = { TCompatibilityRule{ - .BottomLimit = TYdbVersion{ .Year = 1, .Major = 1 }, + .LowerLimit = TYdbVersion{ .Year = 1, .Major = 1 }, .UpperLimit = TYdbVersion{ .Year = 1, .Major = 2, .Minor = 1 }, .Forbidden = true } @@ -221,7 +221,7 @@ Y_UNIT_TEST_SUITE(YdbVersion) { .YdbVersion = TYdbVersion{ .Year = 1, .Major = 3, .Minor = 1, .Hotfix = 0 }, .CanLoadFrom = { TCompatibilityRule{ - .BottomLimit = TYdbVersion{ .Year = 1, .Major = 1 }, + .LowerLimit = TYdbVersion{ .Year = 1, .Major = 1 }, .UpperLimit = TYdbVersion{ .Year = 1, .Major = 3, .Minor = 1, .Hotfix = 0 } } } @@ -258,7 +258,7 @@ Y_UNIT_TEST_SUITE(YdbVersion) { .YdbVersion = TYdbVersion{ .Year = 1, .Major = 3, .Minor = 1, .Hotfix = 0 }, .CanLoadFrom = { TCompatibilityRule{ - .BottomLimit = TYdbVersion{ .Year = 1, .Major = 2 }, + .LowerLimit = TYdbVersion{ .Year = 1, .Major = 2 }, .UpperLimit = TYdbVersion{ .Year = 1, .Major = 3, .Minor = 1, .Hotfix = 0 } } } @@ -277,7 +277,7 @@ Y_UNIT_TEST_SUITE(YdbVersion) { .YdbVersion = TYdbVersion{ .Year = 1, .Major = 3, .Minor = 1, .Hotfix = 0 }, .StoresReadableBy = { TCompatibilityRule{ - .BottomLimit = TYdbVersion{ .Year = 1, .Major = 1 }, + .LowerLimit = TYdbVersion{ .Year = 1, .Major = 1 }, .UpperLimit = TYdbVersion{ .Year = 1, .Major = 3, .Minor = 1, .Hotfix = 0 } } } @@ -300,7 +300,7 @@ Y_UNIT_TEST_SUITE(YdbVersion) { .YdbVersion = TYdbVersion{ .Year = 1, .Major = 3, .Minor = 3, .Hotfix = 1 }, .StoresReadableBy = { TCompatibilityRule{ - .BottomLimit = TYdbVersion{ .Year = 1, .Major = 1 }, + .LowerLimit = TYdbVersion{ .Year = 1, .Major = 1 }, .UpperLimit = TYdbVersion{ .Year = 1, .Major = 3, .Minor = 3, .Hotfix = 1 } } } @@ -319,7 +319,7 @@ Y_UNIT_TEST_SUITE(YdbVersion) { .YdbVersion = TYdbVersion{ .Year = 1, .Major = 3, .Minor = 3, .Hotfix = 1 }, .StoresReadableBy = { TCompatibilityRule{ - .BottomLimit = TYdbVersion{ .Year = 1, .Major = 1, .Minor = 3, .Hotfix = 1 }, + .LowerLimit = TYdbVersion{ .Year = 1, .Major = 1, .Minor = 3, .Hotfix = 1 }, .UpperLimit = TYdbVersion{ .Year = 1, .Major = 3, .Minor = 3, .Hotfix = 1 } } } @@ -338,7 +338,7 @@ Y_UNIT_TEST_SUITE(YdbVersion) { .YdbVersion = TYdbVersion{ .Year = 1, .Major = 3, .Minor = 3, .Hotfix = 1 }, .StoresReadableBy = { TCompatibilityRule{ - .BottomLimit = TYdbVersion{ .Year = 1, .Major = 1, .Minor = 3 }, + .LowerLimit = TYdbVersion{ .Year = 1, .Major = 1, .Minor = 3 }, .UpperLimit = TYdbVersion{ .Year = 1, .Major = 3, .Minor = 3, .Hotfix = 1 } } } @@ -357,7 +357,7 @@ Y_UNIT_TEST_SUITE(YdbVersion) { .YdbVersion = TYdbVersion{ .Year = 1, .Major = 3, .Minor = 3, .Hotfix = 1 }, .StoresReadableBy = { TCompatibilityRule{ - .BottomLimit = TYdbVersion{ .Year = 1, .Major = 1, .Minor = 3 }, + .LowerLimit = TYdbVersion{ .Year = 1, .Major = 1, .Minor = 3 }, .UpperLimit = TYdbVersion{ .Year = 1, .Major = 3, .Minor = 3, .Hotfix = 1 } } } @@ -377,7 +377,7 @@ Y_UNIT_TEST_SUITE(YdbVersion) { .StoresReadableBy = { TCompatibilityRule{ .Build = "nbs", - .BottomLimit = TYdbVersion{ .Year = 1, .Major = 1 }, + .LowerLimit = TYdbVersion{ .Year = 1, .Major = 1 }, .UpperLimit = TYdbVersion{ .Year = 1, .Major = 3, .Minor = 3, .Hotfix = 1 } } } @@ -397,7 +397,7 @@ Y_UNIT_TEST_SUITE(YdbVersion) { .StoresReadableBy = { TCompatibilityRule{ .Build = "nbs", - .BottomLimit = TYdbVersion{ .Year = 1, .Major = 1 }, + .LowerLimit = TYdbVersion{ .Year = 1, .Major = 1 }, .UpperLimit = TYdbVersion{ .Year = 1, .Major = 3, .Minor = 3, .Hotfix = 1 } } } @@ -413,7 +413,7 @@ Y_UNIT_TEST_SUITE(YdbVersion) { .CanLoadFrom = { TCompatibilityRule{ .Build = "ydb", - .BottomLimit = TYdbVersion{ .Year = 1, .Major = 1 }, + .LowerLimit = TYdbVersion{ .Year = 1, .Major = 1 }, .UpperLimit = TYdbVersion{ .Year = 1, .Major = 3, .Minor = 2, .Hotfix = 0 } } } @@ -433,7 +433,7 @@ Y_UNIT_TEST_SUITE(YdbVersion) { .CanLoadFrom = { TCompatibilityRule{ .Build = "ydb", - .BottomLimit = TYdbVersion{ .Year = 1, .Major = 1 }, + .LowerLimit = TYdbVersion{ .Year = 1, .Major = 1 }, .UpperLimit = TYdbVersion{ .Year = 1, .Major = 3, .Minor = 2, .Hotfix = 0 } } } @@ -452,7 +452,7 @@ Y_UNIT_TEST_SUITE(YdbVersion) { .YdbVersion = TYdbVersion{ .Year = 1, .Major = 3, .Minor = 2, .Hotfix = 0 }, .CanLoadFrom = { TCompatibilityRule{ - .BottomLimit = TYdbVersion{ .Year = 1, .Major = 1, .Minor = 3, .Hotfix = 2 }, + .LowerLimit = TYdbVersion{ .Year = 1, .Major = 1, .Minor = 3, .Hotfix = 2 }, .UpperLimit = TYdbVersion{ .Year = 1, .Major = 1, .Minor = 3, .Hotfix = 2 } } } @@ -471,7 +471,7 @@ Y_UNIT_TEST_SUITE(YdbVersion) { .YdbVersion = TYdbVersion{ .Year = 1, .Major = 2, .Minor = 2, .Hotfix = 0 }, .CanLoadFrom = { TCompatibilityRule{ - .BottomLimit = TYdbVersion{ .Year = 1, .Major = 1, .Minor = 3 }, + .LowerLimit = TYdbVersion{ .Year = 1, .Major = 1, .Minor = 3 }, .UpperLimit = TYdbVersion{ .Year = 1, .Major = 1, .Minor = 3 }, .Forbidden = true } @@ -491,11 +491,11 @@ Y_UNIT_TEST_SUITE(YdbVersion) { .YdbVersion = TYdbVersion{ .Year = 1, .Major = 4, .Minor = 2, .Hotfix = 0 }, .CanLoadFrom = { TCompatibilityRule{ - .BottomLimit = TYdbVersion{ .Year = 1, .Major = 1 }, + .LowerLimit = TYdbVersion{ .Year = 1, .Major = 1 }, .UpperLimit = TYdbVersion{ .Year = 1, .Major = 4, .Minor = 2, .Hotfix = 0 }, }, TCompatibilityRule{ - .BottomLimit = TYdbVersion{ .Year = 1, .Major = 2, .Minor = 3 }, + .LowerLimit = TYdbVersion{ .Year = 1, .Major = 2, .Minor = 3 }, .UpperLimit = TYdbVersion{ .Year = 1, .Major = 2, .Minor = 3 }, .Forbidden = true } @@ -515,11 +515,11 @@ Y_UNIT_TEST_SUITE(YdbVersion) { .YdbVersion = TYdbVersion{ .Year = 1, .Major = 4, .Minor = 2, .Hotfix = 0 }, .CanLoadFrom = { TCompatibilityRule{ - .BottomLimit = TYdbVersion{ .Year = 1, .Major = 1 }, + .LowerLimit = TYdbVersion{ .Year = 1, .Major = 1 }, .UpperLimit = TYdbVersion{ .Year = 1, .Major = 4, .Minor = 2, .Hotfix = 0 }, }, TCompatibilityRule{ - .BottomLimit = TYdbVersion{ .Year = 1, .Major = 2, .Minor = 4 }, + .LowerLimit = TYdbVersion{ .Year = 1, .Major = 2, .Minor = 4 }, .UpperLimit = TYdbVersion{ .Year = 1, .Major = 2, .Minor = 4 }, .Forbidden = true } @@ -539,7 +539,7 @@ Y_UNIT_TEST_SUITE(YdbVersion) { .YdbVersion = TYdbVersion{ .Year = 1, .Major = 4, .Minor = 2, .Hotfix = 0 }, .CanLoadFrom = { TCompatibilityRule{ - .BottomLimit = TYdbVersion{ .Year = 1, .Major = 1 }, + .LowerLimit = TYdbVersion{ .Year = 1, .Major = 1 }, .UpperLimit = TYdbVersion{ .Year = 1, .Major = 4, .Minor = 2, .Hotfix = 0 }, .ComponentId = (ui32)EComponentId::Test1, }, @@ -559,7 +559,7 @@ Y_UNIT_TEST_SUITE(YdbVersion) { .YdbVersion = TYdbVersion{ .Year = 1, .Major = 4, .Minor = 2, .Hotfix = 0 }, .CanLoadFrom = { TCompatibilityRule{ - .BottomLimit = TYdbVersion{ .Year = 1, .Major = 1 }, + .LowerLimit = TYdbVersion{ .Year = 1, .Major = 1 }, .UpperLimit = TYdbVersion{ .Year = 1, .Major = 4, .Minor = 2, .Hotfix = 0 }, .ComponentId = (ui32)EComponentId::Test2, }, @@ -623,7 +623,7 @@ Y_UNIT_TEST_SUITE(OldFormat) { .YdbVersion = TYdbVersion{ .Year = 23, .Major = 1, .Minor = 1, .Hotfix = 0 }, .CanLoadFrom = { TCompatibilityRule{ - .BottomLimit = TYdbVersion{ .Year = 22, .Major = 5 }, + .LowerLimit = TYdbVersion{ .Year = 22, .Major = 5 }, .UpperLimit = TYdbVersion{ .Year = 23, .Major = 1, .Minor = 1, .Hotfix = 0 }, }, } @@ -684,14 +684,14 @@ Y_UNIT_TEST_SUITE(OldFormat) { .YdbVersion = TYdbVersion{ .Year = 23, .Major = 1, .Minor = 1, .Hotfix = 0 }, .CanLoadFrom = { TCompatibilityRule{ - .BottomLimit = TYdbVersion{ .Year = 22, .Major = 4 }, + .LowerLimit = TYdbVersion{ .Year = 22, .Major = 4 }, .UpperLimit = TYdbVersion{ .Year = 23, .Major = 1, .Minor = 1, .Hotfix = 0 }, .ComponentId = (ui32)EComponentId::Interconnect }, }, .StoresReadableBy = { TCompatibilityRule{ - .BottomLimit = TYdbVersion{ .Year = 22, .Major = 4 }, + .LowerLimit = TYdbVersion{ .Year = 22, .Major = 4 }, .UpperLimit = TYdbVersion{ .Year = 23, .Major = 1, .Minor = 1, .Hotfix = 0 }, .ComponentId = (ui32)EComponentId::Interconnect }, diff --git a/ydb/core/driver_lib/version/version.cpp b/ydb/core/driver_lib/version/version.cpp index fd5fc287e4..bd9e31aab1 100644 --- a/ydb/core/driver_lib/version/version.cpp +++ b/ydb/core/driver_lib/version/version.cpp @@ -93,7 +93,7 @@ TStored TCompatibilityInfo::MakeStored(ui32 componentId, const TCurrent* current newRule->SetBuild(rule.GetBuild()); } newRule->MutableUpperLimit()->CopyFrom(rule.GetUpperLimit()); - newRule->MutableBottomLimit()->CopyFrom(rule.GetBottomLimit()); + newRule->MutableLowerLimit()->CopyFrom(rule.GetLowerLimit()); newRule->SetForbidden(rule.GetForbidden()); } } @@ -226,7 +226,7 @@ bool CheckRule(std::optional<TString> build, const NKikimrConfig::TYdbVersion* v } } - return (!rule.HasBottomLimit() || CompareVersions(*version, rule.GetBottomLimit()) > -1) && + return (!rule.HasLowerLimit() || CompareVersions(*version, rule.GetLowerLimit()) > -1) && (!rule.HasUpperLimit() || CompareVersions(*version, rule.GetUpperLimit()) < 1); } diff --git a/ydb/core/driver_lib/version/version.h b/ydb/core/driver_lib/version/version.h index 7d30bbdeb3..cefb68ca00 100644 --- a/ydb/core/driver_lib/version/version.h +++ b/ydb/core/driver_lib/version/version.h @@ -40,7 +40,7 @@ public: struct TCompatibilityRule { std::optional<std::string> Build; - std::optional<TYdbVersion> BottomLimit; + std::optional<TYdbVersion> LowerLimit; std::optional<TYdbVersion> UpperLimit; std::optional<ui32> ComponentId; std::optional<bool> Forbidden; @@ -50,8 +50,8 @@ public: if (Build) { res.SetBuild(Build->data()); } - if (BottomLimit) { - res.MutableBottomLimit()->CopyFrom(BottomLimit->ToPB()); + if (LowerLimit) { + res.MutableLowerLimit()->CopyFrom(LowerLimit->ToPB()); } if (UpperLimit) { res.MutableUpperLimit()->CopyFrom(UpperLimit->ToPB()); diff --git a/ydb/core/protos/config.proto b/ydb/core/protos/config.proto index cbe8673356..aedc48a26f 100644 --- a/ydb/core/protos/config.proto +++ b/ydb/core/protos/config.proto @@ -1899,7 +1899,7 @@ message TCompatibilityRule { } optional string Build = 1; - optional TYdbVersion BottomLimit = 2; + optional TYdbVersion LowerLimit = 2; optional TYdbVersion UpperLimit = 3; // don't use enum, because stored data can have values from newer YDB versions, |