-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
feat: allow balance strategies to provide initial state #1633
Conversation
Thanks @aldelucca1 could you please add first some tests for this? thanks |
@d1egoaz been trying to get the Vagrant file on a fresh Vagrant install backed by VirtualBox to spin up so I can extend the functional test, but it fails to provision with the following error:
I've tried older versions of |
@bai would you be able to provide some pointers here? |
Turns out the Vagrant file is referencing a version of ubuntu that doesn't have Upstart. Will fix it as part of this PR |
@d1egoaz this should be ready for a look |
The test seem flaky after pulling in the latest master, seems to be failing intermittently on different checks attempting to install the dependencies |
Seems good to go now |
@aldelucca1 sorry for the late reply on this PR, these changes look reasonable to me — please can you rebase on master and then I can re-review and merge? |
This update will allow stateful balance strategies to provide initial state information to send as part of the `joinGroupRequest`. Previous to this PR if initial data was provided via `c.config.Consumer.Group.Member.UserData` it would always be sent when re-joining. This would trump the previous assignment data returned as part of the `syncGroupRequest`. After this PR the initial data will be sent when there is no currently assigned user-data that was returned as part of the assignment.
d730393
to
bd3257f
Compare
@dnwe requesting re-review since I rebased this PR off of master. |
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, thanks for that
This update will allow stateful balance strategies to provide initial state information to send as part of the
joinGroupRequest
.Previous to this PR if initial data was provided via
c.config.Consumer.Group.Member.UserData
it would always be sent when re-joining. This would trump the previous assignment data returned as part of thesyncGroupRequest
. After this PR the initial data will be sent when there is no currently assigned user-data that was returned as part of the assignment.