You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2020/12/13 09:25:02 UTC

[GitHub] [kafka] dengziming commented on a change in pull request #9739: KAFKA-10636 Bypass log validation for writes to raft log

dengziming commented on a change in pull request #9739:
URL: https://github.com/apache/kafka/pull/9739#discussion_r541885151



##########
File path: core/src/main/scala/kafka/log/Log.scala
##########
@@ -1050,7 +1050,8 @@ class Log(@volatile private var _dir: File,
                      leaderEpoch: Int,
                      origin: AppendOrigin = AppendOrigin.Client,
                      interBrokerProtocolVersion: ApiVersion = ApiVersion.latestVersion): LogAppendInfo = {
-    append(records, origin, interBrokerProtocolVersion, assignOffsets = true, leaderEpoch, ignoreRecordSize = false)
+    val assignOffsets = if (origin == AppendOrigin.Replication) false else true

Review comment:
       This can be replaced by `val assignOffsets = if (origin != AppendOrigin.Replication)`




----------------------------------------------------------------
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:
users@infra.apache.org