dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rdbms: Group disconnect/reconnect errors by DB server name
[lhc/web/wiklou.git]
/
includes
/
libs
/
rdbms
/
loadbalancer
/
LoadBalancer.php
diff --git
a/includes/libs/rdbms/loadbalancer/LoadBalancer.php
b/includes/libs/rdbms/loadbalancer/LoadBalancer.php
index
8393e2b
..
1be8926
100644
(file)
--- a/
includes/libs/rdbms/loadbalancer/LoadBalancer.php
+++ b/
includes/libs/rdbms/loadbalancer/LoadBalancer.php
@@
-568,7
+568,8
@@
class LoadBalancer implements ILoadBalancer {
$knownReachedPos->hasReached( $this->mWaitForPos )
) {
$this->replLogger->debug( __METHOD__ .
$knownReachedPos->hasReached( $this->mWaitForPos )
) {
$this->replLogger->debug( __METHOD__ .
- ": replica DB $server known to be caught up (pos >= $knownReachedPos)." );
+ ': replica DB {dbserver} known to be caught up (pos >= $knownReachedPos).',
+ [ 'dbserver' => $server ] );
return true;
}
return true;
}
@@
-576,13
+577,15
@@
class LoadBalancer implements ILoadBalancer {
$conn = $this->getAnyOpenConnection( $index );
if ( !$conn ) {
if ( !$open ) {
$conn = $this->getAnyOpenConnection( $index );
if ( !$conn ) {
if ( !$open ) {
- $this->replLogger->debug( __METHOD__ . ": no connection open for $server" );
+ $this->replLogger->debug( __METHOD__ . ': no connection open for {dbserver}',
+ [ 'dbserver' => $server ] );
return false;
} else {
$conn = $this->openConnection( $index, self::DOMAIN_ANY );
if ( !$conn ) {
return false;
} else {
$conn = $this->openConnection( $index, self::DOMAIN_ANY );
if ( !$conn ) {
- $this->replLogger->warning( __METHOD__ . ": failed to connect to $server" );
+ $this->replLogger->warning( __METHOD__ . ': failed to connect to {dbserver}',
+ [ 'dbserver' => $server ] );
return false;
}
return false;
}
@@
-592,7
+595,8
@@
class LoadBalancer implements ILoadBalancer {
}
}
}
}
- $this->replLogger->info( __METHOD__ . ": Waiting for replica DB $server to catch up..." );
+ $this->replLogger->info( __METHOD__ . ': Waiting for replica DB {dbserver} to catch up...',
+ [ 'dbserver' => $server ] );
$timeout = $timeout ?: $this->mWaitTimeout;
$result = $conn->masterPosWait( $this->mWaitForPos, $timeout );
$timeout = $timeout ?: $this->mWaitTimeout;
$result = $conn->masterPosWait( $this->mWaitForPos, $timeout );