Skip to content

Commit

Permalink
warn about errors in listing size before throwing out the errors
Browse files Browse the repository at this point in the history
Signed-off-by: simonsan <[email protected]>
  • Loading branch information
simonsan committed Oct 27, 2024
1 parent 51f6db5 commit ce4aca7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
5 changes: 5 additions & 0 deletions crates/backend/src/local.rs
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,11 @@ impl ReadBackend for LocalBackend {
)?,
))
})
.inspect(|r| {
if let Err(err) = r {
warn!("Error while listing files: {:?}", err);
}
})
.filter_map(RusticResult::ok);

Ok(walker.collect())
Expand Down
7 changes: 6 additions & 1 deletion crates/backend/src/opendal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::{collections::HashMap, str::FromStr, sync::OnceLock};

use bytes::Bytes;
use bytesize::ByteSize;
use log::trace;
use log::{trace, warn};
use opendal::{
layers::{BlockingLayer, ConcurrentLimitLayer, LoggingLayer, RetryLayer, ThrottleLayer},
BlockingOperator, Metakey, Operator, Scheme,
Expand Down Expand Up @@ -317,6 +317,11 @@ impl ReadBackend for OpenDALBackend {
)?,
))
})
.inspect(|r| {
if let Err(err) = r {
warn!("Error while listing files: {:?}", err);
}
})
.filter_map(RusticResult::ok)
.collect())
}
Expand Down

0 comments on commit ce4aca7

Please sign in to comment.