Aaron Schulz has uploaded a new change for review.
https://gerrit.wikimedia.org/r/239901
Change subject: Cleaned up $asyncWrites member variable in MultiWriteBagOStuff
......................................................................
Cleaned up $asyncWrites member variable in MultiWriteBagOStuff
Change-Id: I27e48aef77ac0f6453b7837f2b2686b7b5b726d4
---
M includes/objectcache/MultiWriteBagOStuff.php
1 file changed, 3 insertions(+), 7 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/01/239901/1
diff --git a/includes/objectcache/MultiWriteBagOStuff.php
b/includes/objectcache/MultiWriteBagOStuff.php
index b390659..16e842f 100644
--- a/includes/objectcache/MultiWriteBagOStuff.php
+++ b/includes/objectcache/MultiWriteBagOStuff.php
@@ -32,9 +32,7 @@
/** @var BagOStuff[] */
protected $caches;
/** @var bool Use async secondary writes */
- protected $asyncReplication = false;
- /** @var array[] */
- protected $asyncWrites = array();
+ protected $asyncWrites = false;
/**
* $params include:
@@ -72,9 +70,7 @@
: ObjectCache::newFromParams( $cacheInfo );
}
- if ( isset( $params['replication'] ) && $params['replication']
=== 'async' ) {
- $this->asyncReplication = true;
- }
+ $this->asyncWrites = isset( $params['replication'] ) &&
$params['replication'] === 'async';
}
/**
@@ -199,7 +195,7 @@
array_shift( $args );
foreach ( $this->caches as $i => $cache ) {
- if ( $i == 0 || !$this->asyncReplication ) {
+ if ( $i == 0 || !$this->asyncWrites ) {
// First store or in sync mode: write now and
get result
if ( !call_user_func_array( array( $cache,
$method ), $args ) ) {
$ret = false;
--
To view, visit https://gerrit.wikimedia.org/r/239901
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I27e48aef77ac0f6453b7837f2b2686b7b5b726d4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits