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
Merge "Ignore reuseConnection() errors after LoadBalancer/LBFactory destruction"
[lhc/web/wiklou.git]
/
includes
/
filerepo
/
ForeignDBViaLBRepo.php
diff --git
a/includes/filerepo/ForeignDBViaLBRepo.php
b/includes/filerepo/ForeignDBViaLBRepo.php
index
f8b1ed9
..
129d55a
100644
(file)
--- a/
includes/filerepo/ForeignDBViaLBRepo.php
+++ b/
includes/filerepo/ForeignDBViaLBRepo.php
@@
-42,6
+42,9
@@
class ForeignDBViaLBRepo extends LocalRepo {
/** @var array */
protected $fileFromRowFactory = [ 'ForeignDBFile', 'newFromRow' ];
/** @var array */
protected $fileFromRowFactory = [ 'ForeignDBFile', 'newFromRow' ];
+ /** @var bool */
+ protected $hasSharedCache;
+
/**
* @param array|null $info
*/
/**
* @param array|null $info
*/
@@
-56,23
+59,22
@@
class ForeignDBViaLBRepo extends LocalRepo {
* @return IDatabase
*/
function getMasterDB() {
* @return IDatabase
*/
function getMasterDB() {
- return wfGet
DB
( DB_MASTER, [], $this->wiki );
+ return wfGet
LB( $this->wiki )->getConnectionRef
( DB_MASTER, [], $this->wiki );
}
/**
* @return IDatabase
*/
function getSlaveDB() {
}
/**
* @return IDatabase
*/
function getSlaveDB() {
- return wfGet
DB
( DB_REPLICA, [], $this->wiki );
+ return wfGet
LB( $this->wiki )->getConnectionRef
( DB_REPLICA, [], $this->wiki );
}
/**
* @return Closure
*/
protected function getDBFactory() {
}
/**
* @return Closure
*/
protected function getDBFactory() {
- $wiki = $this->wiki;
- return function( $index ) use ( $wiki ) {
- return wfGetDB( $index, [], $wiki );
+ return function( $index ) {
+ return wfGetLB( $this->wiki )->getConnectionRef( $index, [], $this->wiki );
};
}
};
}