cmccabe commented on a change in pull request #9990: URL: https://github.com/apache/kafka/pull/9990#discussion_r581296036
########## File path: core/src/main/scala/kafka/server/ConfigHelper.scala ########## @@ -47,11 +47,11 @@ class ConfigHelper(metadataCache: MetadataCache, config: KafkaConfig, configRepo def createResponseConfig(configs: Map[String, Any], createConfigEntry: (String, Any) => DescribeConfigsResponseData.DescribeConfigsResourceResult): DescribeConfigsResponseData.DescribeConfigsResult = { - val filteredConfigPairs = if (resource.configurationKeys == null) + val filteredConfigPairs = if (resource.configurationKeys == null || resource.configurationKeys.isEmpty) configs.toBuffer else configs.filter { case (configName, _) => - resource.configurationKeys.asScala.forall(_.contains(configName)) + resource.configurationKeys.asScala.contains(configName) Review comment: I think this bug was introduced when `configurationKeys` went from being an `Option[something]` to being a non-optional type in 2.7. The code in 2.6 explains the "cleverness" here-- `forall` always returns true if we're dealing with `None`. The code in 2.7 drops the comment and the `Option` and introduces the bug. So we'll need to fix it in that branch too. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org