Skip to content
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

KAFKA-14500; [2/N] Rewrite GroupMetadata in Java #13663

Merged
merged 15 commits into from
May 12, 2023
Prev Previous commit
Next Next commit
fix
  • Loading branch information
jeffkbkim committed May 9, 2023
commit fc0b7b4da60a9ba9137cd7eb983e59c9baf60d9a
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ private[group] class GroupMetadata(val groupId: String, initialState: GroupState
val (protocol, _) = allMemberMetadata
.map(_.vote(candidates))
.groupBy(identity)
.maxBy { case (a, votes) => votes.size }
.maxBy { case (_, votes) => votes.size }

protocol
}
Expand Down Expand Up @@ -507,8 +507,7 @@ private[group] class GroupMetadata(val groupId: String, initialState: GroupState
// future versions of the consumer protocol. VO must prefix all new versions.
val buffer = ByteBuffer.wrap(member.metadata(protocolName.get))
ConsumerProtocol.deserializeVersion(buffer)
val a = ConsumerProtocol.deserializeSubscription(buffer, 0).topics.asScala.toSet
a
ConsumerProtocol.deserializeSubscription(buffer, 0).topics.asScala.toSet
}.reduceLeft(_ ++ _)
)
} catch {
Expand Down