This is consistent with query error suppression, let the
listener callbacks have a chance to run. This also makes
LoadBalancer::rollbackMasterChanges move on to the other
connections.
Change-Id: Ic8b9dd4b868bfe69b04fb20f7be5fce11d864fc4
$this->mTrxIdleCallbacks = []; // clear
$this->mTrxPreCommitCallbacks = []; // clear
- $this->runOnTransactionIdleCallbacks( self::TRIGGER_ROLLBACK );
- $this->runTransactionListenerCallbacks( self::TRIGGER_ROLLBACK );
+ try {
+ $this->runOnTransactionIdleCallbacks( self::TRIGGER_ROLLBACK );
+ } catch ( Exception $e ) {
+ // already logged; finish and let LoadBalancer move on during mass-rollback
+ }
+ try {
+ $this->runTransactionListenerCallbacks( self::TRIGGER_ROLLBACK );
+ } catch ( Exception $e ) {
+ // already logged; let LoadBalancer move on during mass-rollback
+ }
}
/**
* throwing an Exception is preferrable, using a pre-installed error handler to trigger
* rollback (in any case, failure to issue COMMIT will cause rollback server-side).
*
+ * Query, connection, and onTransaction* callback errors will be suppressed and logged.
+ *
* @param string $fname Calling function name
* @param string $flush Flush flag, set to a situationally valid IDatabase::FLUSHING_*
* constant to disable warnings about calling rollback when no transaction is in