Skip to content

Commit 6948789

Browse files
committed
don't checkpoint if wal is not open
1 parent 0eeaf96 commit 6948789

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

libsql-wal/src/checkpointer.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,9 @@ where
5959
) -> impl Future<Output = crate::error::Result<()>> + Send {
6060
let namespace = namespace.clone();
6161
async move {
62-
let registry = self
63-
.get_async(&namespace)
64-
.await
65-
.expect("namespace not openned");
66-
registry.checkpoint().await?;
62+
if let Some(registry) = self.get_async(&namespace).await {
63+
registry.checkpoint().await?;
64+
}
6765
Ok(())
6866
}
6967
}

0 commit comments

Comments
 (0)