Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
3.4.0
-
None
Description
It is possible for the KRaft controller to report more partitions than are available in the cluster. This is because the following test fail against 3.4.0:
@Test public void testPartitionCountDecreased() { ControllerMetrics metrics = new MockControllerMetrics(); ControllerMetricsManager manager = new ControllerMetricsManager(metrics); Uuid createTopicId = Uuid.randomUuid(); Uuid createPartitionTopicId = new Uuid( createTopicId.getMostSignificantBits(), createTopicId.getLeastSignificantBits() ); Uuid removeTopicId = new Uuid(createTopicId.getMostSignificantBits(), createTopicId.getLeastSignificantBits()); manager.replay(topicRecord("test", createTopicId)); manager.replay(partitionRecord(createPartitionTopicId, 0, 0, Arrays.asList(0, 1, 2))); manager.replay(partitionRecord(createPartitionTopicId, 1, 0, Arrays.asList(0, 1, 2))); manager.replay(removeTopicRecord(removeTopicId)); assertEquals(0, metrics.globalPartitionCount()); }
Attachments
Issue Links
- links to