Details
-
Test
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
None
-
None
Description
The unit tests FetcherTest and FetchRequestManagerTest have methods named assignFromUser() and assignFromUserNoId() that appear to perform duplicate metadata updates:
private void assignFromUser(Set<TopicPartition> partitions) { subscriptions.assignFromUser(partitions); client.updateMetadata(initialUpdateResponse); // A dummy metadata update to ensure valid leader epoch. metadata.updateWithCurrentRequestVersion( RequestTestUtils.metadataUpdateWithIds( "dummy", 1, Collections.emptyMap(), singletonMap(topicName, 4), tp -> validLeaderEpoch, topicIds ), false, 0L ); }
client.updateMetadata() eventually calls metadata.updateWithCurrentRequestVersion(). Determine why the test is updating the cluster metadata twice with different values.