kevin-wu24 commented on code in PR #17582:
URL: https://github.com/apache/kafka/pull/17582#discussion_r1825013396
##########
core/src/main/scala/kafka/server/metadata/KRaftMetadataCache.scala:
##########
@@ -550,8 +550,10 @@ class KRaftMetadataCache(
override def features(): FinalizedFeatures = {
val image = _currentImage
val finalizedFeatures = new java.util.HashMap[String,
java.lang.Short](image.features().finalizedVersions())
- finalizedFeatures.put(KRaftVersion.FEATURE_NAME,
kraftVersionSupplier.get().featureLevel())
-
+ val kraftVersionLevel = kraftVersionSupplier.get().featureLevel()
+ if (kraftVersionLevel > 0) {
Review Comment:
Features are defaulted to level 0, so we don't need that entry in the map.
Since `kraftVersion` can now have feature level 1 to support KIP-853, we should
add that entry to the map.
--
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]