showuon commented on code in PR #16005:
URL: https://github.com/apache/kafka/pull/16005#discussion_r1618530646


##########
core/src/main/java/kafka/log/remote/RemoteLogManager.java:
##########
@@ -340,6 +347,10 @@ public void onLeadershipChange(Set<Partition> 
partitionsBecomeLeader,
         Set<TopicIdPartition> followerPartitions = 
filterPartitions(partitionsBecomeFollower)
                 .map(p -> new TopicIdPartition(topicIds.get(p.topic()), 
p.topicPartition())).collect(Collectors.toSet());
 
+        if (this.rlmConfig.enableRemoteStorageSystem() && 
!isRemoteLogManagerConfigured()) {
+            throw new KafkaException("RemoteLogManager is not configured when 
remote storage system is enabled");
+        }
+

Review Comment:
   nit: Should we move this validation on the top of `onLeadershipChange` 
method?



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