Skip to content

Commit

Permalink
do not log send error
Browse files Browse the repository at this point in the history
  • Loading branch information
jiacai2050 committed Sep 19, 2023
1 parent 525db9f commit ab55ecd
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions components/object_store/src/disk_cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ use chrono::{DateTime, Utc};
use crc::{Crc, CRC_32_ISCSI};
use futures::stream::BoxStream;
use hash_ext::SeaHasherBuilder;
use log::{debug, error, info, warn};
use log::{debug, info, warn};
use lru::LruCache;
use notifier::notifier::{ExecutionGuard, RequestNotifiers};
use partitioned_lock::PartitionedMutex;
Expand Down Expand Up @@ -706,7 +706,7 @@ impl DiskCacheStore {
}
.fail(),
) {
error!("Failed to send notifier error result, err:{e:?}.");
warn!("Failed to send notifier error result, err:{e:?}.");
}
}
}
Expand All @@ -723,8 +723,10 @@ impl DiskCacheStore {
{
self.cache.insert_data(cache_key, bytes.clone()).await;
for notifier in notifiers {
if let Err(e) = notifier.send(Ok(bytes.clone())) {
error!("Failed to send notifier success result, err:{e:?}.");
if notifier.send(Ok(bytes.clone())).is_err() {
// The error contains sent bytes, which maybe very large,
// so we don't log error.
warn!("Failed to send notifier success result");
}
}
}
Expand Down

0 comments on commit ab55ecd

Please sign in to comment.