mirror of
https://github.com/scylladb/scylladb.git
synced 2026-06-02 04:56:58 +00:00
service: topology_state_machine: make topology::find const
This commit is contained in:
@@ -13,7 +13,7 @@ namespace service {
|
||||
|
||||
logging::logger tsmlogger("topology_state_machine");
|
||||
|
||||
const std::pair<const raft::server_id, replica_state>* topology::find(raft::server_id id) {
|
||||
const std::pair<const raft::server_id, replica_state>* topology::find(raft::server_id id) const {
|
||||
auto it = normal_nodes.find(id);
|
||||
if (it != normal_nodes.end()) {
|
||||
return &*it;
|
||||
|
||||
@@ -86,7 +86,7 @@ struct topology {
|
||||
std::unordered_map<raft::server_id, request_param> req_param;
|
||||
|
||||
// Find only nodes in non 'left' state
|
||||
const std::pair<const raft::server_id, replica_state>* find(raft::server_id id);
|
||||
const std::pair<const raft::server_id, replica_state>* find(raft::server_id id) const;
|
||||
// Return true if node exists in any state including 'left' one
|
||||
bool contains(raft::server_id id);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user