aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDeterminant <[email protected]>2020-10-29 01:56:46 -0400
committerDeterminant <[email protected]>2020-10-29 01:56:46 -0400
commit861f1323269acf82059c3c855155ea1aff0db71a (patch)
treef9cc099e3678ff3ce190de38792a40615ff5bc01 /src
parent54ce471c15fda9812d3cd7ef6222701b19892d30 (diff)
handle the empty write properlyHEADmaster
Diffstat (limited to 'src')
-rw-r--r--src/wal.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/wal.rs b/src/wal.rs
index 7975f38..119fdf3 100644
--- a/src/wal.rs
+++ b/src/wal.rs
@@ -255,6 +255,9 @@ impl<F: WALStore> WALFilePool<F> {
&'a mut self,
writes: Vec<(WALPos, WALBytes)>,
) -> Vec<Pin<Box<dyn Future<Output = Result<(), ()>> + 'a>>> {
+ if writes.is_empty() {
+ return Vec::new()
+ }
let file_size = self.file_size;
let file_nbit = self.file_nbit;
let meta: Vec<(u64, u64)> = writes