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/11/19 03:27:41 UTC

[GitHub] [kafka] ijuma commented on a change in pull request #9590: KAFKA-7556: KafkaConsumer.beginningOffsets does not return actual first offsets

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



##########
File path: core/src/main/scala/kafka/log/Log.scala
##########
@@ -1749,6 +1752,9 @@ class Log(@volatile private var _dir: File,
           checkIfMemoryMappedBufferClosed()
           // remove the segments for lookups
           removeAndDeleteSegments(deletable, asyncDelete = true, reason)
+          if (reason == LogCompaction) {
+            maybeIncrementLogStartOffset(segments.firstEntry.getValue.baseOffset, SegmentCompaction)
+          }
           maybeIncrementLogStartOffset(segments.firstEntry.getValue.baseOffset, SegmentDeletion)

Review comment:
       Shouldn't we be passing `reason` instead of what we're doing here?




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