Reduce WAN object cache logging spam for reject set() calls
authorAaron Schulz <aschulz@wikimedia.org>
Tue, 10 Jan 2017 21:20:02 +0000 (13:20 -0800)
committerAaron Schulz <aschulz@wikimedia.org>
Tue, 10 Jan 2017 21:20:02 +0000 (13:20 -0800)
Change-Id: I276c91b3b3b47d337f9c1d91a8348ca8f3d57194

includes/libs/objectcache/WANObjectCache.php

index 01a9149..0db493d 100644 (file)
@@ -448,7 +448,7 @@ class WANObjectCache implements IExpiringStore, LoggerAwareInterface {
                                $wrapExtra[self::FLD_FLAGS] = self::FLG_STALE; // mark as stale
                        // Case B: any long-running transaction; ignore this set()
                        } elseif ( $age > self::MAX_READ_LAG ) {
-                               $this->logger->warning( "Rejected set() for $key due to snapshot lag." );
+                               $this->logger->info( "Rejected set() for $key due to snapshot lag." );
 
                                return true; // no-op the write for being unsafe
                        // Case C: high replication lag; lower TTL instead of ignoring all set()s
@@ -457,7 +457,7 @@ class WANObjectCache implements IExpiringStore, LoggerAwareInterface {
                                $this->logger->warning( "Lowered set() TTL for $key due to replication lag." );
                        // Case D: medium length request with medium replication lag; ignore this set()
                        } else {
-                               $this->logger->warning( "Rejected set() for $key due to high read lag." );
+                               $this->logger->info( "Rejected set() for $key due to high read lag." );
 
                                return true; // no-op the write for being unsafe
                        }