Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions libsql/src/sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,6 @@ impl SyncContext {
remote_encryption,
};
me.read_metadata().await?;
if me.durable_generation == 0 {
return Err(SyncError::InvalidLocalState("generation is 0".to_string()).into());
}
Ok(me)
}

Expand Down Expand Up @@ -575,6 +572,10 @@ impl SyncContext {
metadata
);

if metadata.generation == 0 {
return Err(SyncError::InvalidLocalState("generation is 0".to_string()).into());
}

self.durable_generation = metadata.generation;
self.durable_frame_num = metadata.durable_frame_num;

Expand Down Expand Up @@ -991,7 +992,8 @@ pub async fn try_pull(
if !insert_handle.in_session() {
tracing::debug!(
"pull_frames: generation={}, frame={}, start wal transaction session",
generation, next_frame_no
generation,
next_frame_no
);
insert_handle.begin()?;
}
Expand Down
Loading