jenkins-bot has submitted this change and it was merged. Change subject: Use rollbackMasterChanges instead of rollback in SubmissionHandler ......................................................................
Use rollbackMasterChanges instead of rollback in SubmissionHandler We potentially commit changes to both the wiki DB and the Flow DB, so if we then only rollback the Flow DB on failure, the DB subsystem will refuse to do a partial rollback. Instead, we'll get an "Expected mass rollback of all peer databases" exception. Bug: T150430 Change-Id: I005feac82ea16eb491fe24f838b2df22018d4239 --- M includes/DbFactory.php M includes/SubmissionHandler.php 2 files changed, 9 insertions(+), 1 deletion(-) Approvals: Aaron Schulz: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/DbFactory.php b/includes/DbFactory.php index bc5c5a0..4f97c56 100644 --- a/includes/DbFactory.php +++ b/includes/DbFactory.php @@ -93,4 +93,12 @@ public function waitForSlaves() { wfWaitForSlaves( false, $this->wiki, $this->cluster ); } + + /** + * Roll back changes on all databases. + * @see LBFactory::rollbackMasterChanges + */ + public function rollbackMasterChanges( $fname = __METHOD__ ) { + wfGetLBFactory()->rollbackMasterChanges( $fname ); + } } diff --git a/includes/SubmissionHandler.php b/includes/SubmissionHandler.php index ab89f07..bf99ee2 100644 --- a/includes/SubmissionHandler.php +++ b/includes/SubmissionHandler.php @@ -155,7 +155,7 @@ while ( !$this->deferredQueue->isEmpty() ) { $this->deferredQueue->dequeue(); } - $dbw->rollback( __METHOD__ ); + $this->dbFactory->rollbackMasterChanges( __METHOD__ ); throw $e; } -- To view, visit https://gerrit.wikimedia.org/r/320842 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I005feac82ea16eb491fe24f838b2df22018d4239 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: Catrope <r...@wikimedia.org> Gerrit-Reviewer: Aaron Schulz <asch...@wikimedia.org> Gerrit-Reviewer: Mattflaschen <mflasc...@wikimedia.org> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits