splett2 commented on code in PR #14485:
URL: https://github.com/apache/kafka/pull/14485#discussion_r1345806386
##########
core/src/main/scala/kafka/log/UnifiedLog.scala:
##########
@@ -770,8 +770,8 @@ class UnifiedLog(@volatile var logStartOffset: Long,
val appendInfo = analyzeAndValidateRecords(records, origin,
ignoreRecordSize, !validateAndAssignOffsets, leaderEpoch)
- // return if we have no valid messages or if this is a duplicate of the
last appended entry
- if (appendInfo.validBytes <= 0) appendInfo
+ // return if we have no valid messages
+ if (!appendInfo.hasValidBytes) appendInfo
Review Comment:
I think this may capture the intent a bit better. The comment around
duplicates of last appended entries seems to be a stale comment that was never
updated. Appends don't get deduped in `analyzeAndValidateRecords`.
--
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]