FrankYang0529 commented on code in PR #18267:
URL: https://github.com/apache/kafka/pull/18267#discussion_r1894596233


##########
core/src/main/scala/kafka/server/ReplicaManager.scala:
##########
@@ -2046,7 +2046,7 @@ class ReplicaManager(val config: KafkaConfig,
 
   def getLogConfig(topicPartition: TopicPartition): Option[LogConfig] = 
localLog(topicPartition).map(_.config)
 
-  def getMagic(topicPartition: TopicPartition): Option[Byte] = 
getLogConfig(topicPartition).map(_.recordVersion.value)
+  def getMagic(topicPartition: TopicPartition): Option[Byte] = 
getLogConfig(topicPartition).map(_ => RecordVersion.V2.value)

Review Comment:
   Thanks for review and suggestion. I try to remove `ReplicaManager#getMagic` 
and it looks like some related logic on this path can be removed too. Can I 
also remove them? Thanks.
   
   * 
https://github.com/apache/kafka/blob/fe56fc98fa736c79c9dcbb1f64f810065161a1cc/clients/src/main/java/org/apache/kafka/common/record/AbstractRecords.java#L93C23-L118
   * 
https://github.com/apache/kafka/blob/fe56fc98fa736c79c9dcbb1f64f810065161a1cc/clients/src/main/java/org/apache/kafka/common/record/MemoryRecordsBuilder.java#L94-L119



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

Reply via email to