divijvaidya commented on code in PR #13096: URL: https://github.com/apache/kafka/pull/13096#discussion_r1067055043
########## core/src/main/scala/kafka/coordinator/group/MemberMetadata.scala: ########## @@ -107,7 +107,7 @@ private[group] class MemberMetadata(var memberId: String, * Check if the provided protocol metadata matches the currently stored metadata. */ def matches(protocols: List[(String, Array[Byte])]): Boolean = { - if (protocols.size != this.supportedProtocols.size) + if (protocols.lengthCompare(supportedProtocols) != 0) Review Comment: FYI reviewers - Comparison of two iterables. Reduces comparison time complexity from O(this.size + that.size) to O(this.size min that.size) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org