Chad has uploaded a new change for review.
https://gerrit.wikimedia.org/r/86719
Change subject: Add functionality to force connections even if a single one
fails
......................................................................
Add functionality to force connections even if a single one fails
Requires I80508624 from Elastica.
Change-Id: If7a5829cce180ff96166c608d5349abe58bcde2f
---
M CirrusSearch.php
M includes/CirrusSearchConnection.php
2 files changed, 11 insertions(+), 2 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch
refs/changes/19/86719/1
diff --git a/CirrusSearch.php b/CirrusSearch.php
index 9743802..ac67d9b 100644
--- a/CirrusSearch.php
+++ b/CirrusSearch.php
@@ -37,6 +37,10 @@
// ElasticSearch servers
$wgCirrusSearchServers = array( 'elasticsearch0', 'elasticsearch1',
'elasticsearch2', 'elasticsearch3' );
+// Whether to force connection to servers even if Elastica thinks it failed
+// (eg: you're behind LVS and you should retry)
+$wgCirrusForceConnection = false;
+
// Number of shards for each index
$wgCirrusSearchShardCount = array( 'content' => 4, 'general' => 4 );
diff --git a/includes/CirrusSearchConnection.php
b/includes/CirrusSearchConnection.php
index e43c36c..0b1582d 100644
--- a/includes/CirrusSearchConnection.php
+++ b/includes/CirrusSearchConnection.php
@@ -46,15 +46,20 @@
/**
* @return array(string)
*/
- public static function getServerList() {
+ public function getServerList() {
global $wgCirrusSearchServers;
return $wgCirrusSearchServers;
}
- public static function getIndexBaseName() {
+ public function getIndexBaseName() {
return wfWikiId();
}
+ public function forceConnectionPersistence() {
+ global $wgCirrusForceConnection;
+ return $wgCirrusForceConnection;
+ }
+
/**
* Fetch the Elastica Type for pages.
* @param mixed $type type of index (content or general or false to get
all)
--
To view, visit https://gerrit.wikimedia.org/r/86719
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: If7a5829cce180ff96166c608d5349abe58bcde2f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: master
Gerrit-Owner: Chad <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits