junrao commented on a change in pull request #11345: URL: https://github.com/apache/kafka/pull/11345#discussion_r720394930
########## File path: core/src/main/scala/kafka/log/UnifiedLog.scala ########## @@ -1505,7 +1505,7 @@ class UnifiedLog(@volatile var logStartOffset: Long, /** * Flush all local log segments */ - def flush(): Unit = flush(logEndOffset) + def flush(): Unit = flush(logEndOffset + 1) Review comment: Could we add a comment why we need to flush to logEndOffset + 1? Also, could we have a test that verifies the index file is present after an empty segment is rolled and the broker is shut down? -- 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