mirror of
https://github.com/scylladb/scylladb.git
synced 2026-06-07 07:23:15 +00:00
Refactor the voter handler logic to only pass around node IDs (`raft::server_id`), instead of pairs of IDs and node descriptor references. Node descriptors can always be efficiently retrieved from the original nodes map, which remains valid throughout the calculation. This change reduces unnecessary reference passing and simplifies the code. All node detail lookups are now performed via the central nodes map as needed. Additional cleanup has been done: * removing redundant comments (that just repeat what the code does) * use explicit comparators for the datacenter and rack information priorities (instead of the comparison operator) to be more explicit about the prioritization Fixes: scylladb/scylladb#24035 No backport: This change does not fix any bug and doesn't change the behavior, just cleans up the code in master, therefore no backport is needed. Closes scylladb/scylladb#24452 * https://github.com/scylladb/scylladb: raft: simplify voter handler code to not pass node references around raft: reformat voter handler for consistent indentation raft: use explicit priority comparators for datacenters and racks raft: clean up voter handler by removing redundant comments