mirror of
https://github.com/rustfs/rustfs.git
synced 2026-09-02 02:08:41 +00:00
fix(logging): bound ECStore debug output (#6809)
Also replace deprecated Atomic::fetch_update calls with try_update so the current Rust toolchain keeps lint and CI jobs warning-clean. Co-authored-by: heihutu <heihutu@gmail.com>
This commit is contained in:
@@ -641,7 +641,7 @@ impl<T: Serialize + DeserializeOwned + Send + Sync> QueueStore<T> {
|
||||
// The closure always returns Some, so the update never fails and the Result is discarded.
|
||||
let _ = self
|
||||
.failed_count
|
||||
.fetch_update(Ordering::SeqCst, Ordering::SeqCst, |current| Some(current.saturating_sub(1)));
|
||||
.try_update(Ordering::SeqCst, Ordering::SeqCst, |current| Some(current.saturating_sub(1)));
|
||||
}
|
||||
|
||||
/// Maps a per-entry stat outcome inside the ordered failed scan. A NotFound error means the file
|
||||
|
||||
@@ -53,7 +53,7 @@ impl Drop for HealthDropGuard {
|
||||
/// A budget of `usize::MAX` behaves as "always fail" for any realistic call count.
|
||||
fn consume_failure_budget(budget: &AtomicUsize) -> bool {
|
||||
budget
|
||||
.fetch_update(Ordering::SeqCst, Ordering::SeqCst, |remaining| remaining.checked_sub(1))
|
||||
.try_update(Ordering::SeqCst, Ordering::SeqCst, |remaining| remaining.checked_sub(1))
|
||||
.is_ok()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user