Apply feedback from clang-tidy
This commit is contained in:
parent
b685a21171
commit
b83fb287ad
@ -17,9 +17,8 @@
|
|||||||
#include <queue>
|
#include <queue>
|
||||||
#include <variant>
|
#include <variant>
|
||||||
|
|
||||||
#include <boost/uuid/uuid.hpp>
|
|
||||||
|
|
||||||
#include "coordinator/coordinator.hpp"
|
#include "coordinator/coordinator.hpp"
|
||||||
|
#include "coordinator/coordinator_rsm.hpp"
|
||||||
#include "coordinator/shard_map.hpp"
|
#include "coordinator/shard_map.hpp"
|
||||||
#include "io/address.hpp"
|
#include "io/address.hpp"
|
||||||
#include "io/future.hpp"
|
#include "io/future.hpp"
|
||||||
@ -36,16 +35,12 @@ namespace memgraph::coordinator::coordinator_worker {
|
|||||||
/// * Cron
|
/// * Cron
|
||||||
/// * RouteMessage
|
/// * RouteMessage
|
||||||
|
|
||||||
using boost::uuids::uuid;
|
|
||||||
|
|
||||||
using coordinator::Coordinator;
|
using coordinator::Coordinator;
|
||||||
using coordinator::CoordinatorRsm;
|
using coordinator::CoordinatorRsm;
|
||||||
using coordinator::ShardToInitialize;
|
|
||||||
using io::Address;
|
using io::Address;
|
||||||
using io::RequestId;
|
using io::RequestId;
|
||||||
using io::Time;
|
using io::Time;
|
||||||
using io::messages::CoordinatorMessages;
|
using io::messages::CoordinatorMessages;
|
||||||
using io::rsm::Raft;
|
|
||||||
using msgs::ReadRequests;
|
using msgs::ReadRequests;
|
||||||
using msgs::ReadResponses;
|
using msgs::ReadResponses;
|
||||||
using msgs::WriteRequests;
|
using msgs::WriteRequests;
|
||||||
@ -121,7 +116,7 @@ class CoordinatorWorker {
|
|||||||
|
|
||||||
bool Process(ShutDown && /*shut_down*/) { return false; }
|
bool Process(ShutDown && /*shut_down*/) { return false; }
|
||||||
|
|
||||||
bool Process(Cron &&cron) {
|
bool Process(Cron && /* cron */) {
|
||||||
coordinator_.Cron();
|
coordinator_.Cron();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -136,8 +131,8 @@ class CoordinatorWorker {
|
|||||||
CoordinatorWorker(io::Io<IoImpl> io, Queue queue, Coordinator coordinator)
|
CoordinatorWorker(io::Io<IoImpl> io, Queue queue, Coordinator coordinator)
|
||||||
: io_(io), queue_(std::move(queue)), coordinator_{std::move(io.ForkLocal()), {}, std::move(coordinator)} {}
|
: io_(io), queue_(std::move(queue)), coordinator_{std::move(io.ForkLocal()), {}, std::move(coordinator)} {}
|
||||||
|
|
||||||
CoordinatorWorker(CoordinatorWorker &&) = default;
|
CoordinatorWorker(CoordinatorWorker &&) noexcept = default;
|
||||||
CoordinatorWorker &operator=(CoordinatorWorker &&) = default;
|
CoordinatorWorker &operator=(CoordinatorWorker &&) noexcept = default;
|
||||||
CoordinatorWorker(const CoordinatorWorker &) = delete;
|
CoordinatorWorker(const CoordinatorWorker &) = delete;
|
||||||
CoordinatorWorker &operator=(const CoordinatorWorker &) = delete;
|
CoordinatorWorker &operator=(const CoordinatorWorker &) = delete;
|
||||||
~CoordinatorWorker() = default;
|
~CoordinatorWorker() = default;
|
||||||
|
@ -151,7 +151,7 @@ class LocalTransportHandle {
|
|||||||
const auto now = Now();
|
const auto now = Now();
|
||||||
const Time deadline = now + timeout;
|
const Time deadline = now + timeout;
|
||||||
|
|
||||||
RequestId request_id;
|
RequestId request_id = 0;
|
||||||
{
|
{
|
||||||
std::unique_lock<std::mutex> lock(mu_);
|
std::unique_lock<std::mutex> lock(mu_);
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@ struct LatencyHistogramSummaries {
|
|||||||
std::unordered_map<std::string, LatencyHistogramSummary> latencies;
|
std::unordered_map<std::string, LatencyHistogramSummary> latencies;
|
||||||
|
|
||||||
std::string SummaryTable() {
|
std::string SummaryTable() {
|
||||||
std::string output = "";
|
std::string output;
|
||||||
|
|
||||||
const auto row = [&output](const auto &c1, const auto &c2, const auto &c3, const auto &c4, const auto &c5,
|
const auto row = [&output](const auto &c1, const auto &c2, const auto &c3, const auto &c4, const auto &c5,
|
||||||
const auto &c6, const auto &c7) {
|
const auto &c6, const auto &c7) {
|
||||||
|
@ -86,8 +86,8 @@ class MachineManager {
|
|||||||
coordinator_handle_ = std::jthread([coordinator = std::move(coordinator_worker)]() mutable { coordinator.Run(); });
|
coordinator_handle_ = std::jthread([coordinator = std::move(coordinator_worker)]() mutable { coordinator.Run(); });
|
||||||
}
|
}
|
||||||
|
|
||||||
MachineManager(MachineManager &&) = default;
|
MachineManager(MachineManager &&) noexcept = default;
|
||||||
MachineManager &operator=(MachineManager &&) = default;
|
MachineManager &operator=(MachineManager &&) noexcept = default;
|
||||||
MachineManager(const MachineManager &) = delete;
|
MachineManager(const MachineManager &) = delete;
|
||||||
MachineManager &operator=(const MachineManager &) = delete;
|
MachineManager &operator=(const MachineManager &) = delete;
|
||||||
|
|
||||||
|
@ -95,8 +95,8 @@ class ShardManager {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ShardManager(ShardManager &&) = default;
|
ShardManager(ShardManager &&) noexcept = default;
|
||||||
ShardManager &operator=(ShardManager &&) = default;
|
ShardManager &operator=(ShardManager &&) noexcept = default;
|
||||||
ShardManager(const ShardManager &) = delete;
|
ShardManager(const ShardManager &) = delete;
|
||||||
ShardManager &operator=(const ShardManager &) = delete;
|
ShardManager &operator=(const ShardManager &) = delete;
|
||||||
|
|
||||||
|
@ -127,7 +127,7 @@ class ShardWorker {
|
|||||||
|
|
||||||
bool Process(ShutDown && /* shut_down */) { return false; }
|
bool Process(ShutDown && /* shut_down */) { return false; }
|
||||||
|
|
||||||
bool Process(Cron &&cron) {
|
bool Process(Cron && /* cron */) {
|
||||||
Cron();
|
Cron();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -201,8 +201,8 @@ class ShardWorker {
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
ShardWorker(io::Io<IoImpl> io, Queue queue) : io_(io), queue_(queue) {}
|
ShardWorker(io::Io<IoImpl> io, Queue queue) : io_(io), queue_(queue) {}
|
||||||
ShardWorker(ShardWorker &&) = default;
|
ShardWorker(ShardWorker &&) noexcept = default;
|
||||||
ShardWorker &operator=(ShardWorker &&) = default;
|
ShardWorker &operator=(ShardWorker &&) noexcept = default;
|
||||||
ShardWorker(const ShardWorker &) = delete;
|
ShardWorker(const ShardWorker &) = delete;
|
||||||
ShardWorker &operator=(const ShardWorker &) = delete;
|
ShardWorker &operator=(const ShardWorker &) = delete;
|
||||||
~ShardWorker() = default;
|
~ShardWorker() = default;
|
||||||
|
Loading…
Reference in New Issue
Block a user