mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-13 03:12:13 +00:00
This change includes basic optimizations to locator::describe_ring, mainly caching the per-endpoint information in an unordered_map instead of looking them up in every inner-loop. This yields an improvement of 20% in cpu time. With 45 nodes organized as 3 dcs, 3 racks per dc, 5 nodes per rack, 256 tokens per node, yielding 11520 ranges and 9 replicas per range, describe_ring took Before: 30 milliseconds (2.6 microseconds per range) After: 24 milliseconds (2.1 microseconds per range) Add respective unit test for vnode keyspace and for tablets. Fixes #24887 * backport up to 2025.1 as describe_ring slowness was hit in the field with large clusters Closes scylladb/scylladb#24889 * github.com:scylladb/scylladb: locator: util: optimize describe_ring locator: util: construct_range_to_endpoint_map: pass is_vnode=true to get_natural_replicas vnode_effective_replication_map: do_get_replicas: throw internal error if token not found in map locator: effective_replication_map: get_natural_replicas: get is_vnode param test: cluster: test_repair: add test_vnode_keyspace_describe_ring