Skip to content
Prev 53806 / 63421 Next

[New Patch] Fix disk corruption when writing

On 05/07/2017 5:26 AM, January W. wrote:
That's likely because you aren't writing enough to actually trigger a 
write to disk during the write.  Writes are buffered, and the error 
doesn't happen until the buffer is written.  The regression test I put 
in had this problem; I'm working on MacOS and Windows, so I never got to 
actually try it before committing.

Unfortunately, it doesn't look possible to catch the final flush of the 
buffer when the connection is closed, so small writes won't trigger any 
error.

It's also possible that whatever system you're on doesn't signal an 
error when the write fails.

Duncan Murdoch