-
- if ( $this->dbw->trxLevel() ) {
- $this->dbw->onTransactionResolution( [ $this, 'cancelOnRollback' ], $fname );
+ // Register DB connections for which uncommitted changes are related to this update
+ $conns[] = $dbw;
+ foreach ( $conns as $conn ) {
+ if ( $conn->trxLevel() ) {
+ $conn->onTransactionResolution( [ $this, 'cancelOnRollback' ], $fname );
+ }