jamespfaulkner commented on code in PR #14955:
URL: https://github.com/apache/kafka/pull/14955#discussion_r1439519451


##########
clients/src/test/java/org/apache/kafka/clients/admin/MockAdminClient.java:
##########
@@ -1014,7 +1014,9 @@ synchronized public DescribeLogDirsResult 
describeLogDirs(Collection<Integer> br
                 for (Node node : nodes) {
                     Map<String, LogDirDescription> logDirDescriptionMap = 
unwrappedResults.get(node.id());
                     LogDirDescription logDirDescription = 
logDirDescriptionMap.getOrDefault(partitionLogDirs.get(0), new 
LogDirDescription(null, new HashMap<>()));
-                    logDirDescription.replicaInfos().put(new 
TopicPartition(topicName, topicPartitionInfo.partition()), new ReplicaInfo(0, 
0, false));
+                    Map<TopicPartition, ReplicaInfo> 
topicPartitionReplicaInfoMap = new HashMap<>(logDirDescription.replicaInfos());
+                    topicPartitionReplicaInfoMap.put(new 
TopicPartition(topicName, topicPartitionInfo.partition()), new ReplicaInfo(0, 
0, false));
+                    logDirDescriptionMap.put(partitionLogDirs.get(0), new 
LogDirDescription(logDirDescription.error(), topicPartitionReplicaInfoMap));

Review Comment:
   Good point, thanks for the feedback. I've made this change.



-- 
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.

To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to