feat[balance_strategy]: announcing a new round robin balance strategy#1788
feat[balance_strategy]: announcing a new round robin balance strategy#1788bai merged 4 commits intoIBM:masterfrom kzinglzy:even-round-robin-balance-strategy
Conversation
dnwe
left a comment
There was a problem hiding this comment.
@kzinglzy I'm happy to approve the changes, although I do wonder if the original implementation of the round robin strategy should just be considered flawed and we should replace it with your correct implementation rather than adding this as a new alternative strategy? Whilst I know it would technically be a potentially unexpected change of behaviour for people, it still seems like the right thing to do.
@bai thoughts? I wonder if we should rename the old strategy to something with "legacy" in the name and then make @kzinglzy's implementation the "RoundRobinBalancer" and just mention the change of behaviour in the next release notes?
as mentioned previously, the old implementation of round robin strategy is not so "standard" , in some cases even wrong (e.g. skewed partitions), thus, it may be ok to replace it with a more "standard" implementation directly
|
|
Yeah that was my thinking. To my reading our original implementation was just incorrect, I can't think of a good reason why anyone would prefer it and I think we should accept your PR as a replacement that corrects the behaviour to match the original intention. |
bai
left a comment
There was a problem hiding this comment.
I think it'd be OK to push this new strategy as a replacement (essentially a fix) and rename current one to Legacy.
|
@bai the original implementation has been replaced
|
|
Looks like a change in GitHub Actions broke CI. I've pushed a fix in #1862. Could you please rebase off of master? |
|
@bai please take a look, ready for merge |
There is a different behavior between
In some case, sarama's implementation may incur skewed partitions,
for example:
This PR provides the "really" roundrobin implementation that same as kafka java client did