[Draft] KAFKA-19393: Consolidate consumer assignment state views. #20863
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Currently, Both
SubscriptionStateandAbstractMembershipManagerhave states related with Assignment as their member fields.So, it can be confusing point because which one is source of truth.
Therefore, It would be better to consolidate consumer assignment state views.
Discussion Points.
In this PR,
AbstractMembershipManagerhas stillcurrentAssignmentsandcurrentTargetAssignments.The
LocalAssignmentincludes information of assignment and information of protocol between consumer - broker.So, I'm not sure that
AssignStateorSubscriptionStateknows information of protocol between consumer - broker.So, apart from that, I’ve extracted all the remaining assignment-related data into
AssignState.In addition to, IMHO, Also, since
AssignStateis a subdomain ofSubscriptionin terms of meaning, it has been extracted as an internal state withinSubscription.I made a commit based on my thoughts!
It would like to hear feedback from others.
Please take a look, @lianetm and other reviewer 🙇♂️