database: Make LoadBalancer not yield DB objects that hopelessly lost the connection
authorAaron Schulz <aschulz@wikimedia.org>
Fri, 26 Jun 2015 06:09:52 +0000 (23:09 -0700)
committerKrinkle <krinklemail@gmail.com>
Fri, 26 Jun 2015 07:32:36 +0000 (07:32 +0000)
commit7bea0f628d4a2b672eef162720338ab32b7e429f
tree2b3d2a4020aab8394731f1ff32308d7a38f2111d
parentc63fde6797c2b6ba4b17ba0f9ca3197ed23f327f
database: Make LoadBalancer not yield DB objects that hopelessly lost the connection

* This is useful if the first slave picked went down and others
  can be used, especially in longer running scripts.
* A possible improvement to this would be to eventually allow
  retries by removing the bad handles from the load balancer,
  since isOpen() will never change from false. This would only
  be useful for very very long running CLI scripts and is
  probably an edge case for now.

Change-Id: Iecfc4004b4b2289907a4645b431de19198790d6c
includes/db/DatabaseMysqlBase.php
includes/db/LoadBalancer.php