From b889069722c3d99057e9cdd19138bc69a5126c84 Mon Sep 17 00:00:00 2001 From: hashmap Date: Thu, 25 Oct 2018 19:46:31 +0200 Subject: [PATCH] Make sure the entire buffer was written (#1842) 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 --- store/src/types.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/store/src/types.rs b/store/src/types.rs index 64d6c1494..97b5da487 100644 --- a/store/src/types.rs +++ b/store/src/types.rs @@ -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![];