Skip to content

Commit 8213b7c

Browse files
committed
log error
1 parent e530e84 commit 8213b7c

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

libsql/src/sync.rs

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -912,7 +912,7 @@ pub async fn try_pull(
912912
let frame_no = sync_ctx.durable_frame_num() + 1;
913913
match sync_ctx.pull_frames(generation, frame_no).await {
914914
Ok(PullResult::Frames(frames)) => {
915-
tracing::trace!(
915+
tracing::debug!(
916916
"pull_frames: generation={}, start_frame_no={} (batch_size={}), frame_size={}",
917917
generation,
918918
frame_no,
@@ -928,7 +928,19 @@ pub async fn try_pull(
928928
return Err(SyncError::InvalidPullFrameBytes(frames.len()).into());
929929
}
930930
for chunk in frames.chunks(FRAME_SIZE) {
931-
insert_handle.insert(&chunk)?;
931+
tracing::debug!(
932+
"inserting frame (frame_no={})",
933+
sync_ctx.durable_frame_num + 1
934+
);
935+
let r = insert_handle.insert(&chunk);
936+
if let Err(e) = r {
937+
tracing::debug!(
938+
"insert error (frame= {}) : {:?}",
939+
sync_ctx.durable_frame_num + 1,
940+
e
941+
);
942+
return Err(e);
943+
}
932944
sync_ctx.durable_frame_num += 1;
933945
}
934946
}

0 commit comments

Comments
 (0)