memtier_benchmark icon indicating copy to clipboard operation
memtier_benchmark copied to clipboard

Simplify and improve key generation when working in cluster mode.

Open ushachar opened this issue 2 years ago • 4 comments

Instead of randomly generating keys and storing them per shard until we get a key which matches our desired shard, generate one which will always match. This improved performance and reduces memory overhead when working with a lot of primaries.

ushachar avatar Feb 07 '23 22:02 ushachar

@ushachar / @YaacovHazan can we merge #203 before this one to ensure all code added here is covered on the flow tests. Assuming it is but worth the double check. agree?

filipecosta90 avatar Feb 07 '23 23:02 filipecosta90

@ushachar / @YaacovHazan can we merge #203 before this one to ensure all code added here is covered on the flow tests. Assuming it is but worth the double check. agree?

Sure -- +1'ed #203 This PR doesn't add any tests - but should slightly improve coverage since it removed a big chunk of code. note that I am working on a test around the handling of MOVED.

ushachar avatar Feb 08 '23 08:02 ushachar

@filipecosta90 rebased to include coverage

ushachar avatar Feb 08 '23 13:02 ushachar

Codecov Report

Merging #206 (633321e) into master (78b0a9a) will decrease coverage by 0.34%. The diff coverage is 100.00%.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@            Coverage Diff             @@
##           master     #206      +/-   ##
==========================================
- Coverage   55.90%   55.56%   -0.34%     
==========================================
  Files          21       21              
  Lines        4270     4233      -37     
==========================================
- Hits         2387     2352      -35     
+ Misses       1883     1881       -2     
Impacted Files Coverage Δ
cluster_client.cpp 66.66% <100.00%> (-3.19%) :arrow_down:
shard_connection.h 87.50% <0.00%> (-12.50%) :arrow_down:
protocol.cpp 36.23% <0.00%> (-0.32%) :arrow_down:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

codecov-commenter avatar Feb 08 '23 13:02 codecov-commenter