Closed wadagso-gertjaap closed 2 years ago
Particularly in parts of the code I'm less familiar with, I'd love to have a second set of eyes, so I'll hold off on merging till @metalicjames has a chance to review.
Tested ACK. I've now spent a fair bit more time with the shard-seeder, and this small change (to correctly handle shard replication) has been needed. Looks good to me.
When using an atomizer configuration with a shard replication factor of >1, the shard seeder will not function properly.
The reason is that the seeder uses the config value
m_shard_ranges.size()
as the number of logical shards, but in the atomizer situation this vector will contain duplicates.For 2PC this works, since the shard range is defined on the logical cluster level, so
m_shard_ranges
contains an element count equal to the logical shard count:For Atomizer the range value is defined on individual shards, and are duplicated, so
m_shard_ranges
contains an element count equal to the physical shard count:This PR sorts and de-duplicates the vector of shard ranges to get to the correct count.