Subramanya Sastry has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/233215

Change subject: Enable logger access in closure (followup on 78f1fee5)
......................................................................

Enable logger access in closure (followup on 78f1fee5)

Change-Id: Ia30ce1dda2838b9c3ef1a1e627520e7fab94d2af
---
M includes/libs/objectcache/BagOStuff.php
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/15/233215/1

diff --git a/includes/libs/objectcache/BagOStuff.php 
b/includes/libs/objectcache/BagOStuff.php
index 83e0153..3344d42 100644
--- a/includes/libs/objectcache/BagOStuff.php
+++ b/includes/libs/objectcache/BagOStuff.php
@@ -289,13 +289,13 @@
                }
 
                $lSince = microtime( true ); // lock timestamp
-               $that = $this;
+               $thisLogger = $this.logger;
 
                return new ScopedCallback( function() use ( $that, $key, 
$lSince, $expiry ) {
                        $latency = .050; // latency skew (err towards keeping 
lock present)
                        $age = ( microtime( true ) - $lSince + $latency );
                        if ( ( $age + $latency ) >= $expiry ) {
-                               $that->logger->warning( "Lock for $key held too 
long ($age sec)." );
+                               $thisLogger->warning( "Lock for $key held too 
long ($age sec)." );
                                return; // expired; it's not "safe" to delete 
the key
                        }
                        $that->unlock( $key );

-- 
To view, visit https://gerrit.wikimedia.org/r/233215
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia30ce1dda2838b9c3ef1a1e627520e7fab94d2af
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Subramanya Sastry <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to