Catrope has uploaded a new change for review. https://gerrit.wikimedia.org/r/320842
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(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow refs/changes/42/320842/1 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: newchange Gerrit-Change-Id: I005feac82ea16eb491fe24f838b2df22018d4239 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: Catrope <r...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits