mimaison commented on code in PR #23316:
URL: https://github.com/apache/kafka/pull/23316#discussion_r3949104913


##########
storage/src/main/java/org/apache/kafka/storage/internals/log/AbstractIndex.java:
##########
@@ -252,12 +241,15 @@ public void renameTo(File f) throws IOException {
     }
 
     /**
-     * Flush the data in the index to disk
+     * Flush the data in the index and its metadata to disk
      */
-    public void flush() {
+    public void flush() throws IOException {
         inLock(() -> {
             if (mmap != null) {
                 mmap.force();
+                try (FileChannel channel = FileChannel.open(file.toPath(), 
StandardOpenOption.WRITE)) {

Review Comment:
   Your proposal makes sense. I've pushed an update, hopefully that matches 
what you had in mind. Thanks



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

Reply via email to