diff --git a/src/coordinator/coordinator_worker.hpp b/src/coordinator/coordinator_worker.hpp index 4cf74111e..f61a536d2 100644 --- a/src/coordinator/coordinator_worker.hpp +++ b/src/coordinator/coordinator_worker.hpp @@ -17,9 +17,8 @@ #include #include -#include - #include "coordinator/coordinator.hpp" +#include "coordinator/coordinator_rsm.hpp" #include "coordinator/shard_map.hpp" #include "io/address.hpp" #include "io/future.hpp" @@ -36,16 +35,12 @@ namespace memgraph::coordinator::coordinator_worker { /// * Cron /// * RouteMessage -using boost::uuids::uuid; - using coordinator::Coordinator; using coordinator::CoordinatorRsm; -using coordinator::ShardToInitialize; using io::Address; using io::RequestId; using io::Time; using io::messages::CoordinatorMessages; -using io::rsm::Raft; using msgs::ReadRequests; using msgs::ReadResponses; using msgs::WriteRequests; @@ -121,7 +116,7 @@ class CoordinatorWorker { bool Process(ShutDown && /*shut_down*/) { return false; } - bool Process(Cron &&cron) { + bool Process(Cron && /* cron */) { coordinator_.Cron(); return true; } @@ -136,8 +131,8 @@ class CoordinatorWorker { CoordinatorWorker(io::Io io, Queue queue, Coordinator coordinator) : io_(io), queue_(std::move(queue)), coordinator_{std::move(io.ForkLocal()), {}, std::move(coordinator)} {} - CoordinatorWorker(CoordinatorWorker &&) = default; - CoordinatorWorker &operator=(CoordinatorWorker &&) = default; + CoordinatorWorker(CoordinatorWorker &&) noexcept = default; + CoordinatorWorker &operator=(CoordinatorWorker &&) noexcept = default; CoordinatorWorker(const CoordinatorWorker &) = delete; CoordinatorWorker &operator=(const CoordinatorWorker &) = delete; ~CoordinatorWorker() = default; diff --git a/src/io/local_transport/local_transport_handle.hpp b/src/io/local_transport/local_transport_handle.hpp index 1c2ce2510..2303ae735 100644 --- a/src/io/local_transport/local_transport_handle.hpp +++ b/src/io/local_transport/local_transport_handle.hpp @@ -151,7 +151,7 @@ class LocalTransportHandle { const auto now = Now(); const Time deadline = now + timeout; - RequestId request_id; + RequestId request_id = 0; { std::unique_lock lock(mu_); diff --git a/src/io/message_histogram_collector.hpp b/src/io/message_histogram_collector.hpp index 644fe272b..e663be988 100644 --- a/src/io/message_histogram_collector.hpp +++ b/src/io/message_histogram_collector.hpp @@ -62,7 +62,7 @@ struct LatencyHistogramSummaries { std::unordered_map latencies; 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 &c6, const auto &c7) { diff --git a/src/machine_manager/machine_manager.hpp b/src/machine_manager/machine_manager.hpp index 2bbc99441..8436099fd 100644 --- a/src/machine_manager/machine_manager.hpp +++ b/src/machine_manager/machine_manager.hpp @@ -86,8 +86,8 @@ class MachineManager { coordinator_handle_ = std::jthread([coordinator = std::move(coordinator_worker)]() mutable { coordinator.Run(); }); } - MachineManager(MachineManager &&) = default; - MachineManager &operator=(MachineManager &&) = default; + MachineManager(MachineManager &&) noexcept = default; + MachineManager &operator=(MachineManager &&) noexcept = default; MachineManager(const MachineManager &) = delete; MachineManager &operator=(const MachineManager &) = delete; diff --git a/src/storage/v3/shard_manager.hpp b/src/storage/v3/shard_manager.hpp index 559f51afe..60c7af9db 100644 --- a/src/storage/v3/shard_manager.hpp +++ b/src/storage/v3/shard_manager.hpp @@ -95,8 +95,8 @@ class ShardManager { } } - ShardManager(ShardManager &&) = default; - ShardManager &operator=(ShardManager &&) = default; + ShardManager(ShardManager &&) noexcept = default; + ShardManager &operator=(ShardManager &&) noexcept = default; ShardManager(const ShardManager &) = delete; ShardManager &operator=(const ShardManager &) = delete; diff --git a/src/storage/v3/shard_worker.hpp b/src/storage/v3/shard_worker.hpp index 87d991cfd..0c8ee69c6 100644 --- a/src/storage/v3/shard_worker.hpp +++ b/src/storage/v3/shard_worker.hpp @@ -127,7 +127,7 @@ class ShardWorker { bool Process(ShutDown && /* shut_down */) { return false; } - bool Process(Cron &&cron) { + bool Process(Cron && /* cron */) { Cron(); return true; } @@ -201,8 +201,8 @@ class ShardWorker { public: ShardWorker(io::Io io, Queue queue) : io_(io), queue_(queue) {} - ShardWorker(ShardWorker &&) = default; - ShardWorker &operator=(ShardWorker &&) = default; + ShardWorker(ShardWorker &&) noexcept = default; + ShardWorker &operator=(ShardWorker &&) noexcept = default; ShardWorker(const ShardWorker &) = delete; ShardWorker &operator=(const ShardWorker &) = delete; ~ShardWorker() = default;