You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(minor improvement): small refactoring in NetworkTopologyStrategy's make_token_replica_map()
While trying to look at some random (flaky?) test (#510 (comment) )
I saw some (minor) improvements that can be made to NetworkTopologyStrategy's make_token_replica_map():
1. Remove some redundant len() calls to outside the loop(s)
2. Align some variable names, start with num_ ... for them.
3. Move token_offset and host assignment within the loop to closer to where it's used.
4. Only add DCs and hosts that are in the map
All those are probably very very minor improvements, perhaps in a large cluster it'll be noticable.
Signed-off-by: Yaniv Kaul <[email protected]>
0 commit comments