Skip to content

Commit 63d1c4a

Browse files
committed
bootstrap log error instead of panicking
1 parent 41eae61 commit 63d1c4a

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

libsql/src/sync.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -766,7 +766,12 @@ pub async fn bootstrap_db(sync_ctx: &mut SyncContext) -> Result<()> {
766766
sync_ctx.sync_db_if_needed(info.current_generation).await?;
767767
// when sync_ctx is initialised, we set durable_generation to 0. however, once
768768
// sync_db is called, it should be > 0.
769-
assert!(sync_ctx.durable_generation > 0, "generation should be > 0");
769+
if sync_ctx.durable_generation == 0 {
770+
tracing::error!(
771+
"generation should be > 0, got: {}",
772+
sync_ctx.durable_generation
773+
);
774+
}
770775
sync_ctx.initial_server_sync = true;
771776
}
772777
Ok(())

0 commit comments

Comments
 (0)