jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/390304 )
Change subject: Group messages in WANObjectCache by key
......................................................................
Group messages in WANObjectCache by key
Change-Id: I31c570a095735c9157332660e9f1f542e679410f
(cherry picked from commit 444073ddbc915d0dd64ed98a88431e3972e1e39f)
---
M includes/libs/objectcache/WANObjectCache.php
1 file changed, 8 insertions(+), 4 deletions(-)
Approvals:
Chad: Looks good to me, approved
jenkins-bot: Verified
diff --git a/includes/libs/objectcache/WANObjectCache.php
b/includes/libs/objectcache/WANObjectCache.php
index c6aac9a..e19cf48 100644
--- a/includes/libs/objectcache/WANObjectCache.php
+++ b/includes/libs/objectcache/WANObjectCache.php
@@ -442,7 +442,8 @@
// Do not cache potentially uncommitted data as it might get
rolled back
if ( !empty( $opts['pending'] ) ) {
- $this->logger->info( "Rejected set() for $key due to
pending writes." );
+ $this->logger->info( 'Rejected set() for {cachekey} due
to pending writes.',
+ [ 'cachekey' => $key ] );
return true; // no-op the write for being unsafe
}
@@ -456,16 +457,19 @@
$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->info( "Rejected set() for $key
due to snapshot lag." );
+ $this->logger->info( 'Rejected set() for
{cachekey} due to snapshot lag.',
+ [ 'cachekey' => $key ] );
return true; // no-op the write for being unsafe
// Case C: high replication lag; lower TTL instead of
ignoring all set()s
} elseif ( $lag === false || $lag > self::MAX_READ_LAG
) {
$ttl = $ttl ? min( $ttl, self::TTL_LAGGED ) :
self::TTL_LAGGED;
- $this->logger->warning( "Lowered set() TTL for
$key due to replication lag." );
+ $this->logger->warning( 'Lowered set() TTL for
{cachekey} due to replication lag.',
+ [ 'cachekey' => $key ] );
// Case D: medium length request with medium
replication lag; ignore this set()
} else {
- $this->logger->info( "Rejected set() for $key
due to high read lag." );
+ $this->logger->info( 'Rejected set() for
{cachekey} due to high read lag.',
+ [ 'cachekey' => $key ] );
return true; // no-op the write for being unsafe
}
--
To view, visit https://gerrit.wikimedia.org/r/390304
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I31c570a095735c9157332660e9f1f542e679410f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.31.0-wmf.7
Gerrit-Owner: Chad <[email protected]>
Gerrit-Reviewer: Chad <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits