ijuma commented on code in PR #18468:
URL: https://github.com/apache/kafka/pull/18468#discussion_r1910362866
##########
core/src/main/scala/kafka/coordinator/group/GroupMetadataManager.scala:
##########
@@ -1112,21 +1108,13 @@ object GroupMetadataManager {
*
* @param groupMetadata current group metadata
* @param assignment the assignment for the rebalancing generation
- * @param metadataVersion the api version
+ * @param version the version to serialize it with, the default is `3`, the
highest supported non-flexible version
+ * until a tagged version is bumped. The default should always be
used outside of tests
* @return payload for offset commit message
*/
def groupMetadataValue(groupMetadata: GroupMetadata,
assignment: Map[String, Array[Byte]],
- metadataVersion: MetadataVersion): Array[Byte] = {
-
- val version =
- if (metadataVersion.isLessThan(IBP_0_10_1_IV0)) 0.toShort
- else if (metadataVersion.isLessThan(IBP_2_1_IV0)) 1.toShort
- else if (metadataVersion.isLessThan(IBP_2_3_IV0)) 2.toShort
- // Serialize with the highest supported non-flexible version
- // until a tagged field is introduced or the version is bumped.
- else 3.toShort
-
+ version: Short = 3): Array[Byte] = {
Review Comment:
See the reply to the other comment.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]