MINOR: skip listOffsets request for newly created changelog topics (#8662)
A small hotfix to avoid an extra probing rebalance the first time an application is launched.
This should particularly improve the testing experience.
Reviewer: Matthias J. Sax <matthias@confluent.io>, John Roesler <vvcephei@apache.org>
pull/8674/head
A. Sophie Blee-Goldman5 years agocommitted byGitHub
@ -492,7 +492,7 @@ public class StreamsPartitionAssignor implements ConsumerPartitionAssignor, Conf
@@ -492,7 +492,7 @@ public class StreamsPartitionAssignor implements ConsumerPartitionAssignor, Conf
// make sure the repartition source topics exist with the right number of partitions,
// augment the metadata with the newly computed number of partitions for all the
// repartition source topics
@ -640,14 +640,12 @@ public class StreamsPartitionAssignor implements ConsumerPartitionAssignor, Conf
@@ -640,14 +640,12 @@ public class StreamsPartitionAssignor implements ConsumerPartitionAssignor, Conf
@ -685,9 +683,9 @@ public class StreamsPartitionAssignor implements ConsumerPartitionAssignor, Conf
@@ -685,9 +683,9 @@ public class StreamsPartitionAssignor implements ConsumerPartitionAssignor, Conf
log.debug("Created state changelog topics {} from the parsed topology.",changelogTopicMetadata.values());
returnchangelogsByStatefulTask;
returnnewlyCreatedTopics;
}
/**
@ -703,12 +701,12 @@ public class StreamsPartitionAssignor implements ConsumerPartitionAssignor, Conf
@@ -703,12 +701,12 @@ public class StreamsPartitionAssignor implements ConsumerPartitionAssignor, Conf
@ -758,16 +756,26 @@ public class StreamsPartitionAssignor implements ConsumerPartitionAssignor, Conf
@@ -758,16 +756,26 @@ public class StreamsPartitionAssignor implements ConsumerPartitionAssignor, Conf
@ -794,7 +802,8 @@ public class StreamsPartitionAssignor implements ConsumerPartitionAssignor, Conf
@@ -794,7 +802,8 @@ public class StreamsPartitionAssignor implements ConsumerPartitionAssignor, Conf
@ -802,12 +811,18 @@ public class StreamsPartitionAssignor implements ConsumerPartitionAssignor, Conf
@@ -802,12 +811,18 @@ public class StreamsPartitionAssignor implements ConsumerPartitionAssignor, Conf
@ -1525,38 +1540,6 @@ public class StreamsPartitionAssignor implements ConsumerPartitionAssignor, Conf
@@ -1525,38 +1540,6 @@ public class StreamsPartitionAssignor implements ConsumerPartitionAssignor, Conf
@ -179,7 +179,10 @@ public class HighAvailabilityStreamsPartitionAssignorTest {
@@ -179,7 +179,10 @@ public class HighAvailabilityStreamsPartitionAssignorTest {
@ -56,6 +59,7 @@ public class MockInternalTopicManager extends InternalTopicManager {
@@ -56,6 +59,7 @@ public class MockInternalTopicManager extends InternalTopicManager {