-
Notifications
You must be signed in to change notification settings - Fork 14.4k
KAFKA-17747: [3/N] Get rid of TopicMetadata in SubscribedTopicDescriberImpl #19611
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
base: trunk
Are you sure you want to change the base?
Conversation
Signed-off-by: PoAn Yang <[email protected]>
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.
@FrankYang0529 Thanks for the patch! I have started to look into it and I left a few high level comments to start with. Out of curiosity, have you tried to run the benchmarks before and after the change to see the impact?
@@ -3652,11 +3652,11 @@ private Assignment updateTargetAssignment( | |||
new TargetAssignmentBuilder.ConsumerTargetAssignmentBuilder(group.groupId(), groupEpoch, consumerGroupAssignors.get(preferredServerAssignor)) | |||
.withMembers(group.members()) | |||
.withStaticMembers(group.staticMembers()) | |||
.withSubscriptionMetadata(subscriptionMetadata) | |||
.withSubscriptionTopicIdSet(subscriptionMetadata.values().stream().map(TopicMetadata::id).collect(Collectors.toSet())) |
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 that our goal is to get rid of subscriptionMetadata
so it is a bit surprising to still rely on it here. Could we avoid it?
* @return The set of topic Ids. | ||
*/ | ||
public Set<Uuid> subscriptionTopicIdSet() { | ||
return this.subscriptionTopicIdSet; |
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.
Given how this is used (mainly in tests), I think that we should rather try to remove it. Would it be possible?
Replace
TopicMetadata
withsubscriptionTopicIdSet
andMetadataImage
inSubscribedTopicDescriberImpl
andTargetAssignmentBuilder
.