hudeqi commented on code in PR #14667:
URL: https://github.com/apache/kafka/pull/14667#discussion_r1378377914
##########
core/src/main/scala/kafka/server/ReplicaManager.scala:
##########
@@ -630,13 +630,15 @@ class ReplicaManager(val config: KafkaConfig,
// Third delete the logs and checkpoint.
val errorMap = new mutable.HashMap[TopicPartition, Throwable]()
+ // `tieredEnabledPartitions` has excluded internal topics because the
logic of `unifiedLog.remoteLogEnabled()`
+ val tieredEnabledPartitions = partitionsToStop.filter(sp =>
logManager.getLog(sp.topicPartition).exists(unifiedLog =>
unifiedLog.remoteLogEnabled()))
if (partitionsToDelete.nonEmpty) {
// Delete the logs and checkpoint.
logManager.asyncDelete(partitionsToDelete, isStray = false, (tp, e) =>
errorMap.put(tp, e))
}
remoteLogManager.foreach { rlm =>
- // exclude the partitions with offline/error state
- val partitions = partitionsToStop.filterNot(sp =>
errorMap.contains(sp.topicPartition)).toSet.asJava
+ // exclude the partitions with offline/error state and internal topics
+ val partitions = partitionsToStop.filter(sp =>
!errorMap.contains(sp.topicPartition) &&
tieredEnabledPartitions.contains(sp)).asJava
Review Comment:
updated.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]