chia7712 commented on code in PR #19316:
URL: https://github.com/apache/kafka/pull/19316#discussion_r2021391071


##########
core/src/main/scala/kafka/server/ReplicaFetcherThread.scala:
##########
@@ -161,15 +157,6 @@ class ReplicaFetcherThread(name: String,
     }
   }
 
-  private def maybeWarnIfOversizedRecords(records: MemoryRecords, 
topicPartition: TopicPartition): Unit = {
-    // oversized messages don't cause replication to fail from fetch request 
version 3 (KIP-74)
-    if (metadataVersionSupplier().fetchRequestVersion <= 2 && 
records.sizeInBytes > 0 && records.validBytes <= 0)

Review Comment:
   It seems another use case of `fetchRequestVersion` is dead code. Maybe we 
can remove it as well? 
   ```scala
         val version: Short = if (metadataVersion.fetchRequestVersion >= 13 && 
!fetchData.canUseTopicIds) {
           12
         } else {
           metadataVersion.fetchRequestVersion
         }
   ```
   
   
   
https://github.com/apache/kafka/blob/5982943267ecbc53c42e80feb2d8506aad0c0559/core/src/main/scala/kafka/server/RemoteLeaderEndPoint.scala#L206



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