Aaron Schulz has uploaded a new change for review. https://gerrit.wikimedia.org/r/201567
Change subject: Made rollbackMasterChanges catch exceptions, throwing the last one ...................................................................... Made rollbackMasterChanges catch exceptions, throwing the last one Change-Id: Ida36a302b35434d1af464cb77a0084ec441d038a --- M includes/db/LoadBalancer.php 1 file changed, 9 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/67/201567/1 diff --git a/includes/db/LoadBalancer.php b/includes/db/LoadBalancer.php index 48c636e..9b6f078 100644 --- a/includes/db/LoadBalancer.php +++ b/includes/db/LoadBalancer.php @@ -1004,12 +1004,20 @@ if ( empty( $conns2[$masterIndex] ) ) { continue; } + $exception = null; /** @var DatabaseBase $conn */ foreach ( $conns2[$masterIndex] as $conn ) { if ( $conn->trxLevel() && $conn->writesOrCallbacksPending() ) { - $conn->rollback( __METHOD__, 'flush' ); + try { + $conn->rollback( __METHOD__, 'flush' ); + } catch ( DBError $exception ) { + // failed; try the others + } } } + if ( $exception ) { + throw $exception; // throw the last error + } } } -- To view, visit https://gerrit.wikimedia.org/r/201567 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ida36a302b35434d1af464cb77a0084ec441d038a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Aaron Schulz <asch...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits