Skip to content

Commit 58bcedd

Browse files
alexvrugithub-actions[bot]
authored andcommitted
Support pile identifiers for dynamic nodes too (#18988)
1 parent e2b5c89 commit 58bcedd

File tree

4 files changed

+10
-2
lines changed

4 files changed

+10
-2
lines changed

.github/last_commit.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
cde1dc253a0f9d5f7f11bfe9adb826e4748adf1c
1+
a19b867b82af456bce938a0506364f0ba85214a5

include/ydb-cpp-sdk/client/discovery/discovery.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ struct TNodeRegistrationSettings : public TSimpleRequestSettings<TNodeRegistrati
4848
FLUENT_SETTING(std::string, DomainPath);
4949
FLUENT_SETTING_DEFAULT(bool, FixedNodeId, false);
5050
FLUENT_SETTING(std::string, Path);
51+
FLUENT_SETTING(std::string, BridgePileName);
5152
};
5253

5354
struct TEndpointInfo {
@@ -96,6 +97,7 @@ struct TNodeInfo {
9697
std::string Address;
9798
TNodeLocation Location;
9899
uint64_t Expire;
100+
std::optional<uint32_t> BridgePileId;
99101
};
100102

101103
class TNodeRegistrationResult : public TStatus {

src/api/protos/ydb_discovery.proto

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ message NodeInfo {
8383
optional string address = 5;
8484
optional NodeLocation location = 6;
8585
optional uint64 expire = 7;
86+
optional uint32 bridge_pile_id = 8;
8687
}
8788

8889
message NodeRegistrationRequest {
@@ -94,6 +95,7 @@ message NodeRegistrationRequest {
9495
optional string domain_path = 6;
9596
optional bool fixed_node_id = 7;
9697
optional string path = 8;
98+
optional string bridge_pile_name = 9;
9799
}
98100

99101
message NodeRegistrationResult {

src/client/discovery/discovery.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@ TNodeInfo::TNodeInfo(const Ydb::Discovery::NodeInfo& info)
7777
, Address(info.address())
7878
, Location(info.location())
7979
, Expire(info.expire())
80-
{}
80+
, BridgePileId(info.has_bridge_pile_id() ? std::make_optional(info.bridge_pile_id()) : std::nullopt)
81+
{}
8182

8283
TNodeRegistrationResult::TNodeRegistrationResult(TStatus&& status, const Ydb::Discovery::NodeRegistrationResult& proto)
8384
: TStatus(std::move(status))
@@ -208,6 +209,9 @@ class TDiscoveryClient::TImpl : public TClientImplCommon<TDiscoveryClient::TImpl
208209
if (!settings.Path_.empty()) {
209210
request.set_path(TStringType{settings.Path_});
210211
}
212+
if (!settings.BridgePileName_.empty()) {
213+
request.set_bridge_pile_name(TStringType{settings.BridgePileName_});
214+
}
211215

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

0 commit comments

Comments
 (0)