Aaron Schulz has uploaded a new change for review. https://gerrit.wikimedia.org/r/312421
Change subject: Add DBConnRef sanity check to LoadBalancer::reuseConnection() ...................................................................... Add DBConnRef sanity check to LoadBalancer::reuseConnection() Change-Id: I6b079b994f29c5f7953efe73982ef9e6946a21f8 --- M includes/libs/rdbms/loadbalancer/LoadBalancer.php 1 file changed, 7 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/21/312421/1 diff --git a/includes/libs/rdbms/loadbalancer/LoadBalancer.php b/includes/libs/rdbms/loadbalancer/LoadBalancer.php index c030cb2..bda185a 100644 --- a/includes/libs/rdbms/loadbalancer/LoadBalancer.php +++ b/includes/libs/rdbms/loadbalancer/LoadBalancer.php @@ -597,6 +597,13 @@ * should be ignored */ return; + } elseif ( $conn instanceof DBConnRef ) { + // DBConnRef already handles calling reuseConnection() and only passes the live + // Database instance to this method. Any caller passing in a DBConnRef is broken. + $this->connLogger->error( __METHOD__ . ": got DBConnRef instance.\n" . + ( new RuntimeException() )->getTraceAsString() ); + + return; } $domain = $conn->getDomainID(); -- To view, visit https://gerrit.wikimedia.org/r/312421 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6b079b994f29c5f7953efe73982ef9e6946a21f8 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