CirrusSearch
Elasticsearch-powered search for MediaWiki
|
Performs writes to elasticsearch indexes with requeuing and an exponential backoff (if supported by jobqueue) when the index writes fail. More...
Public Member Functions | |
__construct (array $params) | |
Entry point for jobs received from the job queue. | |
allowRetries () | |
This job handles all its own retries internally. | |
reportUpdateLag (string $cluster, ?StatsFactory $statsFactory=null) | |
Report the update lag based on stored params if set. | |
Public Member Functions inherited from CirrusSearch\Job\CirrusGenericJob | |
getSearchConfig () | |
Static Public Member Functions | |
static | build (ClusterSettings $cluster, string $updateGroup, string $method, array $arguments, array $params=[], ?string $updateKind=null, ?int $rootEventTime=null) |
Protected Member Functions | |
doJob () | |
Additional Inherited Members | |
Protected Attributes inherited from CirrusSearch\Job\CirrusGenericJob | |
$searchConfig | |
Performs writes to elasticsearch indexes with requeuing and an exponential backoff (if supported by jobqueue) when the index writes fail.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. http://www.gnu.org/copyleft/gpl.html
CirrusSearch\Job\ElasticaWrite::__construct | ( | array | $params | ) |
Entry point for jobs received from the job queue.
Creating new jobs should be done via self::build.
array | $params |
Reimplemented from CirrusSearch\Job\CirrusGenericJob.
CirrusSearch\Job\ElasticaWrite::allowRetries | ( | ) |
This job handles all its own retries internally.
These jobs are so numerous that if they were to start failing they would possibly overflow the job queue and bring down redis in production.
Basically we just can't let these jobs hang out in the abandoned queue for a week like retries typically do. If these jobs get failed they will log to CirrusSearchChangeFailed which is a signal that some point in time around the failure needs to be reindexed manually. See https://wikitech.wikimedia.org/wiki/Search for more details.
|
static |
ClusterSettings | $cluster | |
string | $updateGroup | UpdateGroup::* constant |
string | $method | |
array | $arguments | |
array | $params | |
string | null | $updateKind | the kind of update to perform (used for monitoring) |
int | null | $rootEventTime | the time of MW event that caused this update (used for monitoring) |
|
protected |
CirrusSearch\Job\ElasticaWrite::reportUpdateLag | ( | string | $cluster, |
?StatsFactory | $statsFactory = null ) |
Report the update lag based on stored params if set.
string | $cluster | |
StatsFactory | null | $statsFactory | already prefixed with the right component |