mirror of
https://github.com/codership/wsrep-lib.git
synced 2025-07-02 05:22:26 +03:00
Propagate incoming address to provider.
This commit is contained in:
@ -29,6 +29,7 @@ namespace db
|
|||||||
server_service,
|
server_service,
|
||||||
name,
|
name,
|
||||||
server_id,
|
server_id,
|
||||||
|
"",
|
||||||
address,
|
address,
|
||||||
working_dir,
|
working_dir,
|
||||||
wsrep::gtid::undefined(),
|
wsrep::gtid::undefined(),
|
||||||
|
@ -179,6 +179,8 @@ namespace wsrep
|
|||||||
*/
|
*/
|
||||||
const std::string& id() const { return id_; }
|
const std::string& id() const { return id_; }
|
||||||
|
|
||||||
|
const std::string& incoming_address() const
|
||||||
|
{ return incoming_address_; }
|
||||||
/**
|
/**
|
||||||
* Return server group communication address.
|
* Return server group communication address.
|
||||||
*
|
*
|
||||||
@ -488,6 +490,7 @@ namespace wsrep
|
|||||||
wsrep::server_service& server_service,
|
wsrep::server_service& server_service,
|
||||||
const std::string& name,
|
const std::string& name,
|
||||||
const std::string& id,
|
const std::string& id,
|
||||||
|
const std::string& incoming_address,
|
||||||
const std::string& address,
|
const std::string& address,
|
||||||
const std::string& working_dir,
|
const std::string& working_dir,
|
||||||
const wsrep::gtid& initial_position,
|
const wsrep::gtid& initial_position,
|
||||||
@ -512,6 +515,7 @@ namespace wsrep
|
|||||||
, provider_()
|
, provider_()
|
||||||
, name_(name)
|
, name_(name)
|
||||||
, id_(id)
|
, id_(id)
|
||||||
|
, incoming_address_(incoming_address)
|
||||||
, address_(address)
|
, address_(address)
|
||||||
, working_dir_(working_dir)
|
, working_dir_(working_dir)
|
||||||
, max_protocol_version_(max_protocol_version)
|
, max_protocol_version_(max_protocol_version)
|
||||||
@ -552,6 +556,7 @@ namespace wsrep
|
|||||||
wsrep::provider* provider_;
|
wsrep::provider* provider_;
|
||||||
std::string name_;
|
std::string name_;
|
||||||
std::string id_;
|
std::string id_;
|
||||||
|
std::string incoming_address_;
|
||||||
std::string address_;
|
std::string address_;
|
||||||
std::string working_dir_;
|
std::string working_dir_;
|
||||||
int max_protocol_version_;
|
int max_protocol_version_;
|
||||||
|
@ -475,7 +475,7 @@ wsrep::wsrep_provider_v26::wsrep_provider_v26(
|
|||||||
init_args.app_ctx = &server_state;
|
init_args.app_ctx = &server_state;
|
||||||
init_args.node_name = server_state_.name().c_str();
|
init_args.node_name = server_state_.name().c_str();
|
||||||
init_args.node_address = server_state_.address().c_str();
|
init_args.node_address = server_state_.address().c_str();
|
||||||
init_args.node_incoming = "";
|
init_args.node_incoming = server_state_.incoming_address().c_str();
|
||||||
init_args.data_dir = server_state_.working_dir().c_str();
|
init_args.data_dir = server_state_.working_dir().c_str();
|
||||||
init_args.options = provider_options.c_str();
|
init_args.options = provider_options.c_str();
|
||||||
init_args.proto_ver = server_state.max_protocol_version();
|
init_args.proto_ver = server_state.max_protocol_version();
|
||||||
|
@ -22,7 +22,7 @@ namespace wsrep
|
|||||||
const std::string& id,
|
const std::string& id,
|
||||||
enum wsrep::server_state::rollback_mode rollback_mode)
|
enum wsrep::server_state::rollback_mode rollback_mode)
|
||||||
: wsrep::server_state(mutex_, cond_, *this,
|
: wsrep::server_state(mutex_, cond_, *this,
|
||||||
name, id, "", "./", wsrep::gtid::undefined(), 1, rollback_mode)
|
name, id, "", "", "./", wsrep::gtid::undefined(), 1, rollback_mode)
|
||||||
, sync_point_enabled_()
|
, sync_point_enabled_()
|
||||||
, sync_point_action_()
|
, sync_point_action_()
|
||||||
, sst_before_init_()
|
, sst_before_init_()
|
||||||
|
Reference in New Issue
Block a user