mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-17 13:13:36 +00:00
fix PVS check error
This commit is contained in:
parent
9f0fe34bcc
commit
6f672df326
@ -34,6 +34,16 @@ void CoordinationSettings::loadFromConfig(const String & config_elem, const Poco
|
||||
}
|
||||
}
|
||||
|
||||
KeeperSettings::KeeperSettings()
|
||||
: server_id(NOT_EXIST)
|
||||
, tcp_port(NOT_EXIST)
|
||||
, tcp_port_secure(NOT_EXIST)
|
||||
, standalone_keeper(false)
|
||||
, coordination_settings(std::make_shared<CoordinationSettings>())
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void KeeperSettings::dump(WriteBufferFromOwnString & buf) const
|
||||
{
|
||||
auto write = [&buf](const String & content) { buf.write(content.data(), content.size()); };
|
||||
@ -55,12 +65,12 @@ void KeeperSettings::dump(WriteBufferFromOwnString & buf) const
|
||||
write("server_id=");
|
||||
write_int(server_id);
|
||||
|
||||
if (tcp_port != NO_PORT)
|
||||
if (tcp_port != NOT_EXIST)
|
||||
{
|
||||
write("tcp_port=");
|
||||
write_int(tcp_port);
|
||||
}
|
||||
if (tcp_port_secure != NO_PORT)
|
||||
if (tcp_port_secure != NOT_EXIST)
|
||||
{
|
||||
write("tcp_port_secure=");
|
||||
write_int(tcp_port_secure);
|
||||
@ -162,7 +172,6 @@ KeeperSettings::loadFromConfig(const Poco::Util::AbstractConfiguration & config,
|
||||
ret->log_storage_path = getLogsPathFromConfig(config, standalone_keeper_);
|
||||
ret->snapshot_storage_path = getSnapshotsPathFromConfig(config, standalone_keeper_);
|
||||
|
||||
ret->coordination_settings = std::make_shared<CoordinationSettings>();
|
||||
ret->coordination_settings->loadFromConfig("keeper_server.coordination_settings", config);
|
||||
|
||||
return ret;
|
||||
|
@ -54,13 +54,13 @@ using CoordinationSettingsPtr = std::shared_ptr<CoordinationSettings>;
|
||||
|
||||
struct KeeperSettings
|
||||
{
|
||||
static constexpr int NO_PORT = -1;
|
||||
static constexpr int NOT_EXIST = -1;
|
||||
|
||||
KeeperSettings() = default;
|
||||
KeeperSettings();
|
||||
int server_id;
|
||||
|
||||
int tcp_port{NO_PORT};
|
||||
int tcp_port_secure{NO_PORT};
|
||||
int tcp_port;
|
||||
int tcp_port_secure;
|
||||
|
||||
String super_digest;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user