rdbms: make LBFactory close/rollback dangling handles like LoadBalancer
authorAaron Schulz <aschulz@wikimedia.org>
Fri, 9 Aug 2019 00:46:14 +0000 (17:46 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Sat, 17 Aug 2019 19:05:24 +0000 (19:05 +0000)
The application is expected to call shutdown(), so do not commit if that
never happens, which usually indicates some sort of severe error. This
should avoid "already closed" errors that pile on top of uncaught errors.

Bug: T225103
Bug: T230065
Change-Id: I1bdfe87c47bcc2537d0dfc518f7212c2c9bf21d2

includes/libs/rdbms/lbfactory/LBFactory.php

index 4426654..77467f0 100644 (file)
@@ -160,7 +160,6 @@ abstract class LBFactory implements ILBFactory {
        }
 
        public function destroy() {
-               $this->shutdown( self::SHUTDOWN_NO_CHRONPROT );
                $this->forEachLBCallMethod( 'disable' );
        }