junrao commented on a change in pull request #11345: URL: https://github.com/apache/kafka/pull/11345#discussion_r744958189
########## File path: core/src/main/scala/kafka/log/UnifiedLog.scala ########## @@ -1504,6 +1505,8 @@ class UnifiedLog(@volatile var logStartOffset: Long, /** * Flush all local log segments + * We have to pass logEngOffset + 1 to the `def flush(offset: Long): Unit` function to flush empty Review comment: This comment is in the wrong place. ########## File path: core/src/main/scala/kafka/log/UnifiedLog.scala ########## @@ -655,6 +655,7 @@ class UnifiedLog(@volatile var logStartOffset: Long, def close(): Unit = { debug("Closing log") lock synchronized { + flush(logEndOffset + 1) Review comment: This seems to have the same problem that the log recovery point could be moved to logEndOffset + 1, which is a bit weird? -- 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