-
-
Notifications
You must be signed in to change notification settings - Fork 530
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
Range partition assigner #1631
base: master
Are you sure you want to change the base?
Range partition assigner #1631
Conversation
const assignee = sortedMembers[i] | ||
|
||
for (let partition = start; partition < start + length; partition++) { | ||
if (!assignment[assignee]) { |
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.
I think we have 3 levels of for loop which doesn't seem ideal, on the other hand, this is only used once assigning members to the consumers right? So it should be fine I guess. I wanted to ask if you have reasoned about this before as well?
Edit: Well, I noticed the same behaviour from the java version as well :-)
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.
Yes, same flow in java client. There isn't that much data to loop through and like you said it happens once. I see no reason to optimise.
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.
LGTM
What is preventing this PR from being merged? Our team is currently migrating from node-rdkafka to KafkaJS and since the |
Hi,
Here is range partition assigner using the same algorithm as in java client. Please review :)
closes #1564