<div dir="ltr">Hi all,<br><br>I'm using disk_log to log binary data in wrap mode. I'm writing each element of data using disk_log:balog(Log, erlang:iolist_to_binary(Data)). I'm using timer:apply_interval to call disk_log:sync(Log) every couple of seconds. <br>
<br>The problem I'm experiencing is that it seems like the disk_log is occasionally overwriting the ends of previous records at 4K byte boundaries. For example, the data in the file looks like:<br><br>AAAAAAAAAAAAAAAABBBBBBBBBBBBBBBCCCCCCCCCCCCCDD*EEEEEEE<br>
<br>where '*' represents a 4K byte boundary in the file. The data marked 'D' is several hundred bytes long but gets truncated at the boundary and overwritten by E.<br><br>I've logged several gigs of data using this system and only occasionally does a file get in the sort of "mode" where this happens. Once it starts happening, there are hundreds of points in the file that exhibit the problem. After forcing the disk_log to wrap to a new file, the new file does not exhibit the problem.<br>
<br>Any thoughts? Platform is beam 5.6.2, R12B-2, Linux 2.6.22 amd64<br><br>-Todd<br></div>