Simplify and improve key generation when working in cluster mode.#206
Simplify and improve key generation when working in cluster mode.#206
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); |
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.