Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion .github/import_generation.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
19
20
2 changes: 1 addition & 1 deletion .github/last_commit.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
824ceef81947f283a068e13cc46703c70abe0cba
aa02b3d7cea3b9461fe806646f99a51df36d695f
3 changes: 1 addition & 2 deletions include/ydb-cpp-sdk/client/discovery/discovery.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ struct TNodeLocation {
std::optional<uint32_t> BodyNum;
std::optional<uint32_t> Body;

std::optional<std::string> BridgePileName;
std::optional<std::string> DataCenter;
std::optional<std::string> Module;
std::optional<std::string> Rack;
Expand All @@ -48,7 +49,6 @@ struct TNodeRegistrationSettings : public TSimpleRequestSettings<TNodeRegistrati
FLUENT_SETTING(std::string, DomainPath);
FLUENT_SETTING_DEFAULT(bool, FixedNodeId, false);
FLUENT_SETTING(std::string, Path);
FLUENT_SETTING(std::string, BridgePileName);
};

struct TEndpointInfo {
Expand Down Expand Up @@ -97,7 +97,6 @@ struct TNodeInfo {
std::string Address;
TNodeLocation Location;
uint64_t Expire;
std::optional<uint32_t> BridgePileId;
};

class TNodeRegistrationResult : public TStatus {
Expand Down
1 change: 1 addition & 0 deletions src/api/protos/draft/persqueue_error_codes.proto
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ enum EErrorCode {

KAFKA_INVALID_PRODUCER_EPOCH = 32;
KAFKA_OUT_OF_ORDER_SEQUENCE_NUMBER = 33;
KAFKA_DUPLICATE_SEQUENCE_NUMBER = 34;

ERROR = 100;
}
1 change: 0 additions & 1 deletion src/api/protos/draft/ydb_maintenance.proto
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ message Node {
// version defines YDB version for current Node.
// For example, 'ydb-stable-24-1'.
string version = 9;
uint32 pile_id = 10;
}

message ListClusterNodesRequest {
Expand Down
3 changes: 1 addition & 2 deletions src/api/protos/ydb_discovery.proto
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ message NodeLocation {
optional uint32 body_num = 4 [deprecated=true];
optional uint32 body = 100500 [deprecated=true]; // for compatibility with WalleLocation

optional string bridge_pile_name = 5;
optional string data_center = 10;
optional string module = 20;
optional string rack = 30;
Expand All @@ -83,7 +84,6 @@ message NodeInfo {
optional string address = 5;
optional NodeLocation location = 6;
optional uint64 expire = 7;
optional uint32 bridge_pile_id = 8;
}

message NodeRegistrationRequest {
Expand All @@ -95,7 +95,6 @@ message NodeRegistrationRequest {
optional string domain_path = 6;
optional bool fixed_node_id = 7;
optional string path = 8;
optional string bridge_pile_name = 9;
}

message NodeRegistrationResult {
Expand Down
10 changes: 5 additions & 5 deletions src/client/discovery/discovery.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,12 @@ TNodeLocation::TNodeLocation(const Ydb::Discovery::NodeLocation& location)
, RackNum(location.has_rack_num() ? std::make_optional(location.rack_num()) : std::nullopt)
, BodyNum(location.has_body_num() ? std::make_optional(location.body_num()) : std::nullopt)
, Body(location.has_body() ? std::make_optional(location.body()) : std::nullopt)
, BridgePileName(location.has_bridge_pile_name() ? std::make_optional(location.bridge_pile_name()) : std::nullopt)
, DataCenter(location.has_data_center() ? std::make_optional(location.data_center()) : std::nullopt)
, Module(location.has_module() ? std::make_optional(location.module()) : std::nullopt)
, Rack(location.has_rack() ? std::make_optional(location.rack()) : std::nullopt)
, Unit(location.has_unit() ? std::make_optional(location.unit()) : std::nullopt)
{}
{}

TNodeInfo::TNodeInfo(const Ydb::Discovery::NodeInfo& info)
: NodeId(info.node_id())
Expand All @@ -77,7 +78,6 @@ TNodeInfo::TNodeInfo(const Ydb::Discovery::NodeInfo& info)
, Address(info.address())
, Location(info.location())
, Expire(info.expire())
, BridgePileId(info.has_bridge_pile_id() ? std::make_optional(info.bridge_pile_id()) : std::nullopt)
{}

TNodeRegistrationResult::TNodeRegistrationResult(TStatus&& status, const Ydb::Discovery::NodeRegistrationResult& proto)
Expand Down Expand Up @@ -209,13 +209,13 @@ class TDiscoveryClient::TImpl : public TClientImplCommon<TDiscoveryClient::TImpl
if (!settings.Path_.empty()) {
request.set_path(TStringType{settings.Path_});
}
if (!settings.BridgePileName_.empty()) {
request.set_bridge_pile_name(TStringType{settings.BridgePileName_});
}

auto requestLocation = request.mutable_location();
const auto& location = settings.Location_;

if (location.BridgePileName) {
requestLocation->set_bridge_pile_name(TStringType{location.BridgePileName.value()});
}
if (location.DataCenter) {
requestLocation->set_data_center(TStringType{location.DataCenter.value()});
}
Expand Down
Loading