Various database class cleanups
authorAaron Schulz <aschulz@wikimedia.org>
Sat, 20 Aug 2016 06:51:46 +0000 (23:51 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Tue, 23 Aug 2016 03:15:41 +0000 (20:15 -0700)
commit8359993708fcd6668f427b9bf7bafbd5bf18935b
tree0f9c78e8d101e145853b35c5e826808396c503bd
parent78b167b7636fa2b86ba40de55c9578f560b4e555
Various database class cleanups

* Refactor out some code duplication in query() into a
  separate private method.
* Remove the total master/slave query profiling, which is not
  necessary and redundant.
* Provide a default implementation for reconnect().
* Make reconnect() catch errors so it can match the docs that say
  it returns true/false to indicate failure. Likewise for ping().
* Optimize ping() to no-op if there was obvious recent activity.
* Move the ping() round in JobRunner to approveMasterChanges.
  This way, all commit rounds benefit from this logic.
* Add more doc comments for DatabaseBase fields.

Change-Id: Ic90ce2be4187244a0e8d44854c39d4b78be8e642
includes/db/Database.php
includes/db/DatabaseMysqlBase.php
includes/db/loadbalancer/LoadBalancer.php
includes/jobqueue/JobRunner.php