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



##########
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:
       By the way, it seems we might want to rename `assignOffsets` since we 
also rely on this flag for record validation. It's a bit on the verbose side, 
but maybe `validateAndAssignOffsets` to go along with the similarly named 
method in `LogValidator`?




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