Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 33 additions & 5 deletions ydb/core/driver_lib/version/version.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,44 @@ using TComponentId = NKikimrConfig::TCompatibilityRule::EComponentId;
TCompatibilityInfo::TCompatibilityInfo() {
using TCurrentConstructor = TCompatibilityInfo::TProtoConstructor::TCurrentCompatibilityInfo;
using TStoredConstructor = TCompatibilityInfo::TProtoConstructor::TStoredCompatibilityInfo;
// using TCompatibilityRuleConstructor = TCompatibilityInfo::TProtoConstructor::TCompatibilityRule;
using TCompatibilityRuleConstructor = TCompatibilityInfo::TProtoConstructor::TCompatibilityRule;
using TVersionConstructor = TCompatibilityInfo::TProtoConstructor::TVersion;

/////////////////////////////////////////////////////////
// Current CompatibilityInfo
/////////////////////////////////////////////////////////

auto current = TCurrentConstructor{
.Application = "ydb"
.Application = "ydb",
.Version = TVersionConstructor{
.Year = 24,
.Major = 1,
},
.CanLoadFrom = {
TCompatibilityRuleConstructor{
.Application = "ydb",
.LowerLimit = TVersionConstructor{ .Year = 23, .Major = 3 },
.UpperLimit = TVersionConstructor{ .Year = 24, .Major = 1 },
},
},
.StoresReadableBy = {
TCompatibilityRuleConstructor{
.Application = "ydb",
.LowerLimit = TVersionConstructor{ .Year = 23, .Major = 3 },
.UpperLimit = TVersionConstructor{ .Year = 24, .Major = 1 },
},
},
.CanConnectTo = {
TCompatibilityRuleConstructor{
.Application = "ydb",
.LowerLimit = TVersionConstructor{ .Year = 23, .Major = 3 },
.UpperLimit = TVersionConstructor{ .Year = 24, .Major = 1 },
},
}
}.ToPB();

// bool success = CompleteFromTag(current);
bool success = CompleteFromTag(current);
Y_UNUSED(success);
// Y_ABORT_UNLESS(success);

CurrentCompatibilityInfo.CopyFrom(current);
Expand Down Expand Up @@ -76,12 +102,14 @@ const TStored* TCompatibilityInfo::GetDefault(TComponentId componentId) const {
// obsolete version control
TMaybe<NActors::TInterconnectProxyCommon::TVersionInfo> VERSION = NActors::TInterconnectProxyCommon::TVersionInfo{
// version of this binary
"trunk",
"stable-24-1",

// compatible versions; must include all compatible old ones, including this one; version verification occurs on both
// peers and connection is accepted if at least one of peers accepts the version of the other peer
{
"trunk"
"stable-23-3",
"stable-23-4",
"stable-24-1"
}
};

Expand Down