Make sure the entire buffer was written
We may write just a part of the buffer and we don't check the result, so
write_all is probably what we need here
@@ -178,7 +178,7 @@ impl AppendOnlyFile {
}
self.buffer_start += self.buffer.len();
- self.file.write(&self.buffer[..])?;
+ self.file.write_all(&self.buffer[..])?;
self.file.sync_all()?;
self.buffer = vec![];
