Details
-
Bug
-
Status: Resolved
-
Critical
-
Resolution: Fixed
-
2.7.0
Description
When ZkAdminManager.describeConfigs receives DescribeConfigsResource with 2 or more configurationKeys specified, it returns an empty configuration.
Here's a test for ZkAdminManagerTest that reproduces this issue:
@Test def testDescribeConfigsWithConfigurationKeys(): Unit = { EasyMock.expect(zkClient.getEntityConfigs(ConfigType.Topic, topic)).andReturn(TestUtils.createBrokerConfig(brokerId, "zk")) EasyMock.expect(metadataCache.contains(topic)).andReturn(true) EasyMock.replay(zkClient, metadataCache) val resources = List(new DescribeConfigsRequestData.DescribeConfigsResource() .setResourceName(topic) .setResourceType(ConfigResource.Type.TOPIC.id) .setConfigurationKeys(List("retention.ms", "retention.bytes", "segment.bytes").asJava) ) val adminManager = createAdminManager() val results: List[DescribeConfigsResponseData.DescribeConfigsResult] = adminManager.describeConfigs(resources, true, true) assertEquals(Errors.NONE.code, results.head.errorCode()) val resultConfigKeys = results.head.configs().asScala.map(r => r.name()).toSet assertEquals(Set("retention.ms", "retention.bytes", "segment.bytes"), resultConfigKeys) }
Works fine with one configuration key, though.
The patch is following shortly.
Attachments
Issue Links
- links to