rajinisivaram commented on a change in pull request #8979: URL: https://github.com/apache/kafka/pull/8979#discussion_r454320983
########## File path: core/src/main/scala/kafka/server/ReplicaManager.scala ########## @@ -716,8 +712,12 @@ class ReplicaManager(val config: KafkaConfig, _: LogDirNotFoundException | _: ReplicaNotAvailableException | _: KafkaStorageException) => - warn("Unable to alter log dirs for %s".format(topicPartition), e) + warn(s"Unable to alter log dirs for $topicPartition", e) (topicPartition, Errors.forException(e)) + case e: NotLeaderOrFollowerException => + // Retaining REPLICA_NOT_AVAILABLE exception for ALTER_REPLICA_LOG_DIRS for compatibility + warn(s"Unable to alter log dirs for $topicPartition", e) + (topicPartition, Errors.REPLICA_NOT_AVAILABLE) Review comment: Updated to change to NOT_LEADER_OR_FOLLOWER from 2.7 onwards. Also added note to upgrade docs. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org