-
Notifications
You must be signed in to change notification settings - Fork 217
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Simplify and improve key generation when working in cluster mode. #206
base: master
Are you sure you want to change the base?
Conversation
30b1e91
to
f8019be
Compare
@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 |
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.
f8019be
to
633321e
Compare
@filipecosta90 rebased to include coverage |
Codecov Report
📣 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
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
if (m_config->requests > 0 && m_reqs_generated >= m_config->requests) | ||
return false; | ||
} | ||
*key_index = m_obj_gen->get_key_index(iter); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.