clolov commented on code in PR #16502:
URL: https://github.com/apache/kafka/pull/16502#discussion_r1665512327


##########
core/src/main/java/kafka/log/remote/RemoteLogManager.java:
##########
@@ -679,23 +683,46 @@ List<EpochEntry> getLeaderEpochEntries(UnifiedLog log, 
long startOffset, long en
         }
     }
 
-    class RLMTask extends CancellableRunnable {
+    abstract class RLMTask extends CancellableRunnable {
+        protected final TopicIdPartition topicIdPartition;
+        protected final Logger logger;
 
-        private final TopicIdPartition topicIdPartition;
-        private final int customMetadataSizeLimit;
-        private final Logger logger;
+        protected volatile int leaderEpoch = -1;
 
-        private volatile int leaderEpoch = -1;
+        boolean isLeader() {
+            return leaderEpoch >= 0;
+        }
 
-        public RLMTask(TopicIdPartition topicIdPartition, int 
customMetadataSizeLimit) {
+        public RLMTask(TopicIdPartition topicIdPartition) {
             this.topicIdPartition = topicIdPartition;
-            this.customMetadataSizeLimit = customMetadataSizeLimit;
             LogContext logContext = new LogContext("[RemoteLogManager=" + 
brokerId + " partition=" + topicIdPartition + "] ");
-            logger = logContext.logger(RLMTask.class);
+            this.logger = logContext.logger(RemoteDataExpirationTask.class);

Review Comment:
   I think this shouldn't be here as this is an abstract class



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