showuon commented on code in PR #14329: URL: https://github.com/apache/kafka/pull/14329#discussion_r1315851160
########## core/src/test/scala/unit/kafka/server/ReplicaManagerTest.scala: ########## @@ -3487,8 +3487,12 @@ class ReplicaManagerTest { assertTrue(replicaManager.logManager.getLog(tp0).isDefined) } if (enableRemoteStorage) { - verify(mockRemoteLogManager, times(1)) - .stopPartitions(ArgumentMatchers.eq(Collections.singleton(tp0)), ArgumentMatchers.eq(false), any()) + if (throwIOException) { + verify(mockRemoteLogManager, times(0)).stopPartitions(any(), any()) Review Comment: Could you explain more about why we don't call `stopPartitions` when `throwIOException` now? My understanding is this should be a bug previously that we didn't filter out the error partition. Is that right? ########## storage/src/main/java/org/apache/kafka/server/log/remote/metadata/storage/TopicBasedRemoteLogMetadataManager.java: ########## @@ -377,7 +377,9 @@ private void initializeResources() { final NewTopic remoteLogMetadataTopicRequest = createRemoteLogMetadataTopicRequest(); boolean topicCreated = false; long startTimeMs = time.milliseconds(); - try (AdminClient adminClient = AdminClient.create(rlmmConfig.commonProperties())) { Review Comment: Nice fix! -- 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