chia7712 commented on a change in pull request #9731:
URL: https://github.com/apache/kafka/pull/9731#discussion_r540664521



##########
File path: core/src/main/scala/kafka/log/Log.scala
##########
@@ -893,7 +892,7 @@ class Log(@volatile private var _dir: File,
     // offset (see below). The next time the log is reloaded, we will load 
producer state using this snapshot
     // (or later snapshots). Otherwise, if there is no snapshot file, then we 
have to rebuild producer state
     // from the first segment.
-    if (messageFormatVersion < RecordBatch.MAGIC_VALUE_V2 ||
+    if (recordVersion.value < RecordBatch.MAGIC_VALUE_V2 ||

Review comment:
       How about replacing ```messageFormatVersion``` by 
```recordVersion.value``` for all usages in this method.

##########
File path: core/src/main/scala/kafka/log/Log.scala
##########
@@ -1970,7 +1969,6 @@ class Log(@volatile private var _dir: File,
           baseOffset = newOffset,
           config,
           time = time,

Review comment:
       there is a same issue 
https://github.com/apache/kafka/blob/trunk/core/src/main/scala/kafka/log/LogCleaner.scala#L456




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


Reply via email to