Ejegg has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/396422 )
Change subject: Better requeue on db locks
......................................................................
Better requeue on db locks
Look in the whole 'extra' array, not just the trace.
Change-Id: Ia7d55d7451fd5d6064789c6f4205025aaa504eb5
---
M sites/all/modules/wmf_common/WmfException.php
1 file changed, 13 insertions(+), 9 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm
refs/changes/22/396422/1
diff --git a/sites/all/modules/wmf_common/WmfException.php
b/sites/all/modules/wmf_common/WmfException.php
index 1ab193d..9cb6e4b 100644
--- a/sites/all/modules/wmf_common/WmfException.php
+++ b/sites/all/modules/wmf_common/WmfException.php
@@ -189,15 +189,19 @@
function isRequeue()
{
- if ( $this->extra && !empty( $this->extra['trace'] ) ) {
- // We want to retry later if the problem was a lock wait timeout
- // or a deadlock. Unfortunately we have to do string
parsing to
- // figure that out.
- if ( preg_match( '/\'12(05|13) \*\* /', $this->extra['trace'] )
) {
- return TRUE;
- }
- }
- return $this->getErrorCharacteristic('requeue', FALSE);
+ if ($this->extra) {
+ // We want to retry later if the problem was a lock wait timeout
+ // or a deadlock. Unfortunately we have to do string parsing to
+ // figure that out.
+ $flattened = print_r($this->extra, TRUE);
+ if (
+ preg_match('/\'12(05|13) \*\* /', $flattened) ||
+ preg_match('/Database lock encountered/', $flattened)
+ ) {
+ return TRUE;
+ }
+ }
+ return $this->getErrorCharacteristic('requeue', FALSE);
}
function isFatal()
--
To view, visit https://gerrit.wikimedia.org/r/396422
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia7d55d7451fd5d6064789c6f4205025aaa504eb5
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Ejegg <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits