jolshan commented on code in PR #16183:
URL: https://github.com/apache/kafka/pull/16183#discussion_r1684712684
##########
core/src/main/scala/kafka/server/BrokerLifecycleManager.scala:
##########
@@ -381,10 +381,12 @@ class BrokerLifecycleManager(
private def sendBrokerRegistration(): Unit = {
val features = new BrokerRegistrationRequestData.FeatureCollection()
_supportedFeatures.asScala.foreach {
- case (name, range) => features.add(new
BrokerRegistrationRequestData.Feature().
+ // Do not include features with the range 0-0.
+ case (name, range) if range.max() > 0 => features.add(new
BrokerRegistrationRequestData.Feature().
Review Comment:
My proposal was that in defaultSupportedFeatues, we iterate over the
features and add them to a map. Instead of just adding them all, we check if
the range is 0-0. If so, we don't add them. Thus, we don't need specific logic
in the apis to remove the feature later.
The only concern is if somehow the features map expected a feature to exist.
Not sure I follow mutating if the config is on or off. I assume we can't change
the config to enable unstable features dynamically. (If we did, we'd have to
mutate the map anyway)
--
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]