Open GoogleCodeExporter opened 9 years ago
I've dug into this a bit more and this issue appears to be caused by holding
the log file open in the Unix version of LogImpl.cpp. The file is truncated
underneath the process, but the process still keeps the writing pointer where
it was so on the next write, it creates a sparse file up to the offset of the
write.
I have found some information to suggest that calling fflush() will push all
writes to the files and update the file position pointer, but I have not been
able to test this myself.
In the meantime, the workaround is to have a post log rotate script that
restarts the process, which is not ideal.
Original comment by martywes...@gmail.com
on 24 Feb 2015 at 8:46
fflush will not handle a truncated file (which is essentially what happens when
you remove the file), hence it wont fix the solution.
There needs to be a way for you to notify OZW to close/open the Log file, but
its racy. Instead we should implement a function to perform log file rotation
within OZW. Hence, adding this as a enhancement.
In the mean time, if your concerned about space, once things are running
smoothly, turn down the logging.
Original comment by jus...@dynam.ac
on 2 Mar 2015 at 2:37
Original issue reported on code.google.com by
martywes...@gmail.com
on 24 Feb 2015 at 6:28