Brion VIBBER has uploaded a new change for review.
https://gerrit.wikimedia.org/r/290478
Change subject: Add LBFactory::closeAll() method
......................................................................
Add LBFactory::closeAll() method
Needed to allow long-running background tasks to close out database
connections in a way that allows them to reopen later when needed
again.
Bug: T97641
Change-Id: I4974b691392d4225b15e7b771a28a2cefeb9d8e4
---
M includes/db/loadbalancer/LBFactory.php
1 file changed, 9 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/78/290478/1
diff --git a/includes/db/loadbalancer/LBFactory.php
b/includes/db/loadbalancer/LBFactory.php
index b78793f..2379083 100644
--- a/includes/db/loadbalancer/LBFactory.php
+++ b/includes/db/loadbalancer/LBFactory.php
@@ -452,6 +452,15 @@
}
} );
}
+
+ /**
+ * Close all open database connections on all open load balancers.
+ * @since 1.29
+ */
+ public function closeAll() {
+ $this->forEachLBCallMethod( 'closeAll', [] );
+ }
+
}
/**
--
To view, visit https://gerrit.wikimedia.org/r/290478
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I4974b691392d4225b15e7b771a28a2cefeb9d8e4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Brion VIBBER <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits