ijuma commented on a change in pull request #11036:
URL: https://github.com/apache/kafka/pull/11036#discussion_r671566299



##########
File path: core/src/main/scala/kafka/server/KafkaApis.scala
##########
@@ -774,10 +774,10 @@ class KafkaApis(val requestChannel: RequestChannel,
         // which were written in the new format prior to the version downgrade.
         val unconvertedRecords = FetchResponse.recordsOrFail(partitionData)
         val downConvertMagic =
-          logConfig.map(_.messageFormatVersion.recordVersion.value).flatMap { 
magic =>
-            if (magic > RecordBatch.MAGIC_VALUE_V0 && versionId <= 1 && 
!unconvertedRecords.hasCompatibleMagic(RecordBatch.MAGIC_VALUE_V0))
+          logConfig.map(_.recordVersion.value).flatMap { magic =>

Review comment:
       With IBP 3.0, the message format version will always be 3.0 and the 
record version will always be 2, so it works as you said. Even though it's a 
bit roundabout. I could have the IBP check here, but it seems to spread the 
logic into more places. I could add a comment perhaps. Thoughts?




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