Skip to content

Commit 7955f1a

Browse files
committed
Add debug logging when delete_objects return Err
1 parent 5411d33 commit 7955f1a

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

icechunk/src/storage/mod.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ use std::{
3333
};
3434
use tokio::io::AsyncRead;
3535
use tokio_util::io::SyncIoBridge;
36-
use tracing::instrument;
36+
use tracing::{debug, instrument};
3737

3838
use async_trait::async_trait;
3939
use bytes::{Buf, Bytes};
@@ -497,9 +497,12 @@ pub trait Storage: fmt::Debug + fmt::Display + private::Sealed + Sync + Send {
497497
.for_each_concurrent(10, |batch| {
498498
let res = Arc::clone(&res);
499499
async move {
500-
// FIXME: handle error instead of skipping
501500
let new_deletes =
502-
self.delete_batch(prefix, batch).await.unwrap_or_default();
501+
self.delete_batch(prefix, batch).await.unwrap_or_else(|_| {
502+
// FIXME: handle error instead of skipping
503+
debug!("ignoring error in Storage::delete_batch");
504+
Default::default()
505+
});
503506
#[allow(clippy::expect_used)]
504507
res.lock().expect("Bug in delete objects").merge(&new_deletes);
505508
}

0 commit comments

Comments
 (0)