I also thought the same. But I got the same messages in my /kafka/logs dir even after rebooting my machine in less than the time given by log.flush.interval.ms=900000. So can you please suggest me any way to check that messages are actually loosing after machine shutdown? On Fri, Oct 11, 2013 at 8:56 PM, Jun Rao <[EMAIL PROTECTED]> wrote: *Moniii*
I believe this is the first complaint we have got on a lack of data loss.
The behavior of kafka is to immediately write all messages to the filesystem. The operating system will sync the file to disk at its own pace (we give some docs on how linux does it in our operations section in the kafka docs and this is pretty well documented on the internet). As the docs say, the configuration you are describing just controls the frequency with which kafka forces an fsync and has nothing to do with writing to the fs (which is always immediate). Fysnc makes the os write the data in its cache to physical disk.
This makes forcing message loss a little hard. Killing the process won't work because the data is not stored in the application memory it is in the filesystem cache. Shutting down the machine will not cause this as the OS flushes the data to disk before shutting down. If you want to force data loss I think you need to yank the plug on the machine immediately after a write but prior to both an application level fsync and the OS's own flush policy.
-Jay On Mon, Oct 14, 2013 at 10:00 AM, Monika Garg <[EMAIL PROTECTED]> wrote:
I also filed this bug + patch ( https://issues.apache.org/jira/browse/KAFKA-1042) where the config variables you mention are not actually enforced within an active segment. It is related, but the reverse of what you are looking for. The flush intervals are not enforced properly; however, the filesystem will still flush at it's own pace (linux fs), regardless of the intervals specified in the config. *The crux*: *The config intervals are more useful (after a bug fix) forflushing more often, not less often. * * * Joris On Mon, Oct 14, 2013 at 10:28 AM, Jay Kreps <[EMAIL PROTECTED]> wrote:
I was mixing the kafka log.flush policy with that of OS in a sense that is explained below:
I read the below property of Kafka
The number of messages written to a log partition before we force an fsync on the log.
So I thought it is only kafka who is doing fSync on data in partitions in order to flush them to disk.I hadn't gone through the docs you mentioned(in the operations section of kafka docs).But now I have gone through it and it cleared my doubt for flushing data to disk...:-)
Thanks a lot..:-) On Tue, Oct 15, 2013 at 3:58 AM, Joris VanRemoortere < [EMAIL PROTECTED]> wrote: *Moniii*
NEW: Monitor These Apps!
Apache Lucene, Apache Solr and all other Apache Software Foundation project and their respective logos are trademarks of the Apache Software Foundation.
Elasticsearch, Kibana, Logstash, and Beats are trademarks of Elasticsearch BV, registered in the U.S. and in other countries. This site and Sematext Group is in no way affiliated with Elasticsearch BV.
Service operated by Sematext