diff --git a/service/topology_state_machine.cc b/service/topology_state_machine.cc index 1b84b3173f..c544780a73 100644 --- a/service/topology_state_machine.cc +++ b/service/topology_state_machine.cc @@ -13,7 +13,7 @@ namespace service { logging::logger tsmlogger("topology_state_machine"); -const std::pair* topology::find(raft::server_id id) { +const std::pair* topology::find(raft::server_id id) const { auto it = normal_nodes.find(id); if (it != normal_nodes.end()) { return &*it; diff --git a/service/topology_state_machine.hh b/service/topology_state_machine.hh index e7de7e4ede..8775a787d1 100644 --- a/service/topology_state_machine.hh +++ b/service/topology_state_machine.hh @@ -86,7 +86,7 @@ struct topology { std::unordered_map req_param; // Find only nodes in non 'left' state - const std::pair* find(raft::server_id id); + const std::pair* find(raft::server_id id) const; // Return true if node exists in any state including 'left' one bool contains(raft::server_id id); };