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 "rdbms: cleanup code for read-only propagation for master connections"
[lhc/web/wiklou.git]
/
includes
/
deferred
/
WANCacheReapUpdate.php
diff --git
a/includes/deferred/WANCacheReapUpdate.php
b/includes/deferred/WANCacheReapUpdate.php
index
5ffc938
..
a218f76
100644
(file)
--- a/
includes/deferred/WANCacheReapUpdate.php
+++ b/
includes/deferred/WANCacheReapUpdate.php
@@
-1,5
+1,7
@@
<?php
<?php
+use MediaWiki\MediaWikiServices;
+use MediaWiki\Linker\LinkTarget;
use Psr\Log\LoggerInterface;
use Wikimedia\Rdbms\IDatabase;
use Psr\Log\LoggerInterface;
use Wikimedia\Rdbms\IDatabase;
@@
-10,7
+12,7
@@
use Wikimedia\Rdbms\IDatabase;
* recentchanges table as a reliable stream to make certain keys reach consistency
* as soon as the underlying replica database catches up. These means that critical
* keys will not escape getting purged simply due to brief hiccups in the network,
* recentchanges table as a reliable stream to make certain keys reach consistency
* as soon as the underlying replica database catches up. These means that critical
* keys will not escape getting purged simply due to brief hiccups in the network,
- * which are more prone to happen ac
c
ross datacenters.
+ * which are more prone to happen across datacenters.
*
* ----
* "I was trying to cheat death. I was only trying to surmount for a little while the
*
* ----
* "I was trying to cheat death. I was only trying to surmount for a little while the
@@
-38,7
+40,7
@@
class WANCacheReapUpdate implements DeferrableUpdate {
function doUpdate() {
$reaper = new WANObjectCacheReaper(
function doUpdate() {
$reaper = new WANObjectCacheReaper(
-
ObjectCache::getMainWANInstanc
e(),
+
MediaWikiServices::getInstance()->getMainWANObjectCach
e(),
ObjectCache::getLocalClusterInstance(),
[ $this, 'getTitleChangeEvents' ],
[ $this, 'getEventAffectedKeys' ],
ObjectCache::getLocalClusterInstance(),
[ $this, 'getTitleChangeEvents' ],
[ $this, 'getEventAffectedKeys' ],
@@
-97,10
+99,10
@@
class WANCacheReapUpdate implements DeferrableUpdate {
*
* @see WANObjectCacheRepear
* @param WANObjectCache $cache
*
* @see WANObjectCacheRepear
* @param WANObjectCache $cache
- * @param
TitleValue
$t
+ * @param
LinkTarget
$t
* @return string[]
*/
* @return string[]
*/
- public function getEventAffectedKeys( WANObjectCache $cache,
TitleValue
$t ) {
+ public function getEventAffectedKeys( WANObjectCache $cache,
LinkTarget
$t ) {
/** @var WikiPage[]|LocalFile[]|User[] $entities */
$entities = [];
/** @var WikiPage[]|LocalFile[]|User[] $entities */
$entities = [];
@@
-108,7
+110,7
@@
class WANCacheReapUpdate implements DeferrableUpdate {
// namespaces, but special pages do appear in RC sometimes, e.g. for logs
// of AbuseFilter filter changes.
if ( $t->getNamespace() >= 0 ) {
// namespaces, but special pages do appear in RC sometimes, e.g. for logs
// of AbuseFilter filter changes.
if ( $t->getNamespace() >= 0 ) {
- $entities[] = WikiPage::factory( Title::newFrom
TitleValue
( $t ) );
+ $entities[] = WikiPage::factory( Title::newFrom
LinkTarget
( $t ) );
}
if ( $t->inNamespace( NS_FILE ) ) {
}
if ( $t->inNamespace( NS_FILE ) ) {