showuon commented on code in PR #16653: URL: https://github.com/apache/kafka/pull/16653#discussion_r1699444483
########## core/src/main/java/kafka/log/remote/RemoteLogManager.java: ########## @@ -507,17 +542,21 @@ public void stopPartitions(Set<StopPartition> stopPartitions, LOGGER.error("Error while stopping the partition: {}", stopPartition, ex); } } - // Note `deleteLocalLog` will always be true when `deleteRemoteLog` is true but not the other way around. Set<TopicIdPartition> deleteLocalPartitions = stopPartitions.stream() .filter(sp -> sp.deleteLocalLog() && topicIdByPartitionMap.containsKey(sp.topicPartition())) .map(sp -> new TopicIdPartition(topicIdByPartitionMap.get(sp.topicPartition()), sp.topicPartition())) .collect(Collectors.toSet()); Review Comment: I removed `sp.deleteRemoteLog` because we already set `sp.stopRemoteLogMetadataManager` correctly if `sp.deleteRemoteLog` is true. So, only check `(sp.stopRemoteLogMetadataManager || sp.deleteLocalLog)` now. -- 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