[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Lower the amount of jobs pushed into redis at once

2017-04-19 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/349113 )

Change subject: Lower the amount of jobs pushed into redis at once
..


Lower the amount of jobs pushed into redis at once

This further limits how long the server can be tied up by push().

Change-Id: I02d242578dadc19912c9fccfdcf5e15c5eb78e9e
---
M includes/jobqueue/JobQueueRedis.php
1 file changed, 3 insertions(+), 1 deletion(-)

Approvals:
  Krinkle: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/jobqueue/JobQueueRedis.php 
b/includes/jobqueue/JobQueueRedis.php
index c2c9d66..eb91680 100644
--- a/includes/jobqueue/JobQueueRedis.php
+++ b/includes/jobqueue/JobQueueRedis.php
@@ -75,6 +75,8 @@
/** @var string Compression method to use */
protected $compression;
 
+   const MAX_PUSH_SIZE = 25; // avoid tying up the server
+
/**
 * @param array $params Possible keys:
 *   - redisConfig : An array of parameters to 
RedisConnectionPool::__construct().
@@ -212,7 +214,7 @@
if ( $flags & self::QOS_ATOMIC ) {
$batches = [ $items ]; // all or nothing
} else {
-   $batches = array_chunk( $items, 100 ); // avoid 
tying up the server
+   $batches = array_chunk( $items, 
self::MAX_PUSH_SIZE );
}
$failed = 0;
$pushed = 0;

-- 
To view, visit https://gerrit.wikimedia.org/r/349113
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I02d242578dadc19912c9fccfdcf5e15c5eb78e9e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Lower the amount of jobs pushed into redis at once

2017-04-19 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349113 )

Change subject: Lower the amount of jobs pushed into redis at once
..

Lower the amount of jobs pushed into redis at once

This further limits how long the server can be tied up by push().

Change-Id: I02d242578dadc19912c9fccfdcf5e15c5eb78e9e
---
M includes/jobqueue/JobQueueRedis.php
1 file changed, 3 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/13/349113/1

diff --git a/includes/jobqueue/JobQueueRedis.php 
b/includes/jobqueue/JobQueueRedis.php
index c2c9d66..eb91680 100644
--- a/includes/jobqueue/JobQueueRedis.php
+++ b/includes/jobqueue/JobQueueRedis.php
@@ -75,6 +75,8 @@
/** @var string Compression method to use */
protected $compression;
 
+   const MAX_PUSH_SIZE = 25; // avoid tying up the server
+
/**
 * @param array $params Possible keys:
 *   - redisConfig : An array of parameters to 
RedisConnectionPool::__construct().
@@ -212,7 +214,7 @@
if ( $flags & self::QOS_ATOMIC ) {
$batches = [ $items ]; // all or nothing
} else {
-   $batches = array_chunk( $items, 100 ); // avoid 
tying up the server
+   $batches = array_chunk( $items, 
self::MAX_PUSH_SIZE );
}
$failed = 0;
$pushed = 0;

-- 
To view, visit https://gerrit.wikimedia.org/r/349113
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I02d242578dadc19912c9fccfdcf5e15c5eb78e9e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits