diff --git a/limitador/src/storage/redis/redis_cached.rs b/limitador/src/storage/redis/redis_cached.rs index afe2b79b..d8513ad6 100644 --- a/limitador/src/storage/redis/redis_cached.rs +++ b/limitador/src/storage/redis/redis_cached.rs @@ -18,6 +18,7 @@ use std::str::FromStr; use std::sync::atomic::{AtomicBool, Ordering}; use std::sync::{Arc, Mutex, MutexGuard}; use std::time::{Duration, Instant}; +use tracing::{error, warn}; // This is just a first version. // @@ -259,6 +260,7 @@ impl CachedRedisStorage { loop { if p.load(Ordering::Acquire) { if storage.is_alive().await { + warn!("Partition to Redis resolved!"); p.store(false, Ordering::Release); } } else { @@ -307,6 +309,9 @@ impl CachedRedisStorage { } fn partitioned(&self, partition: bool) -> bool { + if partition { + error!("Partition to Redis detected!") + } self.partitioned .compare_exchange(!partition, partition, Ordering::Release, Ordering::Acquire) .is_ok()