Resolve unused variables
Reviewers: ipaljak, mferencevic Reviewed By: mferencevic Subscribers: pullbot Differential Revision: https://phabricator.memgraph.io/D2330
This commit is contained in:
parent
a878a11e70
commit
02fb644bdc
@ -29,8 +29,10 @@ BoltSession::BoltSession(SessionData *data,
|
|||||||
communication::OutputStream>(input_stream,
|
communication::OutputStream>(input_stream,
|
||||||
output_stream),
|
output_stream),
|
||||||
transaction_engine_(data->db, data->interpreter),
|
transaction_engine_(data->db, data->interpreter),
|
||||||
|
#ifndef MG_SINGLE_NODE_HA
|
||||||
auth_(data->auth),
|
auth_(data->auth),
|
||||||
audit_log_(data->audit_log),
|
audit_log_(data->audit_log),
|
||||||
|
#endif
|
||||||
endpoint_(endpoint) {}
|
endpoint_(endpoint) {}
|
||||||
|
|
||||||
using TEncoder =
|
using TEncoder =
|
||||||
|
@ -74,9 +74,11 @@ class BoltSession final
|
|||||||
};
|
};
|
||||||
|
|
||||||
query::TransactionEngine transaction_engine_;
|
query::TransactionEngine transaction_engine_;
|
||||||
|
#ifndef MG_SINGLE_NODE_HA
|
||||||
auth::Auth *auth_;
|
auth::Auth *auth_;
|
||||||
std::optional<auth::User> user_;
|
std::optional<auth::User> user_;
|
||||||
audit::Log *audit_log_;
|
audit::Log *audit_log_;
|
||||||
|
#endif
|
||||||
io::network::Endpoint endpoint_;
|
io::network::Endpoint endpoint_;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -52,12 +52,12 @@ const nlohmann::json GetSystemInfo() {
|
|||||||
auto mem_data = utils::ReadLines("/proc/meminfo");
|
auto mem_data = utils::ReadLines("/proc/meminfo");
|
||||||
for (auto &row : mem_data) {
|
for (auto &row : mem_data) {
|
||||||
auto tmp = utils::Trim(row);
|
auto tmp = utils::Trim(row);
|
||||||
if (utils::StartsWith(row, "MemTotal")) {
|
if (utils::StartsWith(tmp, "MemTotal")) {
|
||||||
auto split = utils::Split(row);
|
auto split = utils::Split(tmp);
|
||||||
if (split.size() < 2) continue;
|
if (split.size() < 2) continue;
|
||||||
memory = std::stoull(split[1]);
|
memory = std::stoull(split[1]);
|
||||||
} else if (utils::StartsWith(row, "SwapTotal")) {
|
} else if (utils::StartsWith(tmp, "SwapTotal")) {
|
||||||
auto split = utils::Split(row);
|
auto split = utils::Split(tmp);
|
||||||
if (split.size() < 2) continue;
|
if (split.size() < 2) continue;
|
||||||
swap = std::stoull(split[1]);
|
swap = std::stoull(split[1]);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user