Skip to content

Commit 9ae8787

Browse files
committed
libsql: Assert generation in write_metadata()
1 parent 6237e57 commit 9ae8787

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

libsql/src/sync.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -531,6 +531,8 @@ impl SyncContext {
531531
pub(crate) async fn write_metadata(&mut self) -> Result<()> {
532532
let path = format!("{}-info", self.db_path);
533533

534+
assert!(self.durable_generation > 0);
535+
534536
let mut metadata = MetadataJson {
535537
hash: 0,
536538
version: METADATA_VERSION,

0 commit comments

Comments
 (0)