ccding opened a new pull request #10405:
URL: https://github.com/apache/kafka/pull/10405


   Kafka does not call fsync() on the directory when a new log segment is 
created and flushed to disk.
   
   The problem is that following sequence of calls doesn't guarantee file 
durability:
   
   fd = open("log", O_RDWR | O_CREATE); // suppose open creates "log"
   write(fd);
   fsync(fd);
   
   If the system crashes after fsync() but before the parent directory has been 
flushed to disk, the log file can disappear.
   
   This PR is to flush the directory when flush() is called for the first time.


-- 
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:
[email protected]


Reply via email to