jenkins-bot has submitted this change and it was merged. Change subject: JobQueueRedis::doBatchPush(): report metrics even when failures occur ......................................................................
JobQueueRedis::doBatchPush(): report metrics even when failures occur The way the method is currently written, no stats are reported at all when failures occur. Change-Id: I627e8f6ce3a59098bc8949da7ed22f5c924177fc (cherry picked from commit 666407c3abd19dc10da3a5945f6c619041a92524) --- M includes/jobqueue/JobQueueRedis.php 1 file changed, 5 insertions(+), 5 deletions(-) Approvals: Ori.livneh: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/jobqueue/JobQueueRedis.php b/includes/jobqueue/JobQueueRedis.php index 29c8068..f631c11 100644 --- a/includes/jobqueue/JobQueueRedis.php +++ b/includes/jobqueue/JobQueueRedis.php @@ -218,14 +218,14 @@ $failed += count( $itemBatch ); } } - if ( $failed > 0 ) { - wfDebugLog( 'JobQueueRedis', "Could not insert {$failed} {$this->type} job(s)." ); - - throw new RedisException( "Could not insert {$failed} {$this->type} job(s)." ); - } JobQueue::incrStats( 'inserts', $this->type, count( $items ) ); JobQueue::incrStats( 'dupe_inserts', $this->type, count( $items ) - $failed - $pushed ); + if ( $failed > 0 ) { + $err = "Could not insert {$failed} {$this->type} job(s)."; + wfDebugLog( 'JobQueueRedis', $err ); + throw new RedisException( $err ); + } } catch ( RedisException $e ) { $this->throwRedisException( $conn, $e ); } -- To view, visit https://gerrit.wikimedia.org/r/247986 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I627e8f6ce3a59098bc8949da7ed22f5c924177fc Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.27.0-wmf.2 Gerrit-Owner: Ori.livneh <o...@wikimedia.org> Gerrit-Reviewer: Aaron Schulz <asch...@wikimedia.org> Gerrit-Reviewer: Ori.livneh <o...@wikimedia.org> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits