Commit graph

27 commits

Author SHA1 Message Date
Aaron Schulz
3c2a172c3f Move DBConnRef/MaintainableDBConnRef to Rdbms namespace
Change-Id: I7ca6b40f973b2aae83747de92e280ded222c87e3
2017-03-29 11:04:47 -07:00
Aaron Schulz
488a647831 Move IDatabase/IMaintainableDatabase to Rdbms namespace
Change-Id: If7e8a8ff574661fd827de8bcec11d2c39a687300
2017-03-28 15:32:38 -07:00
Aaron Schulz
64df456b39 Move remaining LoadBalancer classes to Rdbms
The old names are left as aliases.

Change-Id: I52a327f2463a2ba7437324047b5b00d28cd1d758
2017-02-23 20:38:31 -08:00
Aaron Schulz
fe59c39da9 Add LoadBalancer::getMaintenanceConnectionRef() method
This is useful when IMaintainableDatabase methods are needed
for foreign wiki connections to things like external store.

Also:
* Set visibility for ExternalStoreDB methods.
* Cleaned up various type hints and comments.

Change-Id: Ie35b1ff21032cc4e78912dc499486da23aeba041
2016-12-10 15:35:09 -08:00
Aaron Schulz
0ceb2f8d4c Use getConnectionRef() in ExternalStoreDB to avoid connection leaks
Change-Id: I3df270241653841a4fb2f65e240aae9d2e0b650f
2016-09-21 08:01:00 +00:00
Aaron Schulz
950cf6016c Rename DB_SLAVE constant to DB_REPLICA
This is more consistent with LoadBalancer, modern, and inclusive
of master/master mysql, NDB cluster, and MariaDB galera cluster.

The old constant is an alias now.

Change-Id: I0b37299ecb439cc446ffbe8c341365d1eef45849
2016-09-05 22:55:53 -07:00
Aaron Schulz
16266edff3 Change "slave" => "replica DB" in /includes
Change-Id: Icb716219c9335ff8fa447b1733d04b71d9712bf9
2016-09-05 21:01:01 +00:00
Aaron Schulz
89557f204f Fix ExternalStoreDB IDEA errors
Change-Id: I6200173fd1cba4bdf03b61659a48016107672fad
2016-04-20 18:17:25 +00:00
Kunal Mehta
6e9b4f0e9c Convert all array() syntax to []
Per wikitech-l consensus:
 https://lists.wikimedia.org/pipermail/wikitech-l/2016-February/084821.html

Notes:
* Disabled CallTimePassByReference due to false positives (T127163)

Change-Id: I2c8ce713ce6600a0bb7bf67537c87044c7a45c4b
2016-02-17 01:33:00 -08:00
Aaron Schulz
7c07943eab Update more docs and type hints to use IDatabase
Change-Id: I8c8d85b32a8aba21e14d2a2dde4c25eb509186c1
2015-10-06 18:49:52 -07:00
Aaron Schulz
0f7893f877 Update various @params from DatabaseBase to IDatabase
Change-Id: I98e44cdffb0fc0d729f69f702799139afb988c20
2015-10-05 05:24:29 +00:00
Aaron Schulz
086e17a37c Clear the DBO_TRX flag for sanity in ExternalStore
* This avoids an explicit commit of an implicit transaction when the site
  config for the ES cluster does not clear that flag by mistake.

Change-Id: I57d8b04cbf3249849db1643fc82673e9de8ea15b
2014-09-12 11:43:34 -07:00
umherirrender
9c614ac02d Fixed some @params documentation
Swapped some "$var type" to "type $var" or added missing types
before the $var. Changed some other types to match the more common
spelling. Makes beginning of some text in captial.

Change-Id: I8c9f30128b46086064326708a4878228ba459447
2014-04-14 19:52:18 +00:00
Alexandre Emsenhuber
449ee32451 Add missing line breaks to wfDebug() calls
Also removed true as second parameter to it from CloneDatabase.php
since it is the default value of that parameter.

Change-Id: I727ebae2bd4df0e26019985ce8c7ce73381c5642
2014-03-29 11:52:07 +01:00
Alexandre Emsenhuber
8d701eeeea Remove trailing line breaks from wfDebugLog() messages
This is useless since the message is passed through trim() and a
line break is added afterwards.

Change-Id: I1a26b30a07f7c9c749fce5bb6b2b4b3d79901b7c
2014-02-04 22:16:13 +01:00
Tim Starling
ad9c52c217 ExternalStoreDB: update for PHP 5
Support for PHP 4 was dropped in 2006, so the ampersands are no longer
needed. I guess this code doesn't get looked at very often.

Change-Id: I344043d17061014d4370d8f68b3bc86b8c4f9453
2013-12-03 14:52:44 +11:00
Siebrand Mazeland
d4902a82db Update formatting of externalstore classes
Change-Id: Ie31c370ba497eedc7458973b704132cf4725cf1f
2013-11-26 13:16:02 +00:00
Aaron Schulz
3969c43bcc Break some long lines
Change-Id: I6b984e03611f937320464e32567495e5b61e315f
2013-08-07 19:26:28 -07:00
Erik Bernhardson
bfe131448e Batch retreival of ES data with minimal round trips
Batches ES urls by schema and host to reduce round trips required to retreive
many pieces of data.  Takes array of ES urls to retreive and returns a map
from ES urls to their data.  Errored urls are represented with a boolean false
in the result set.  Initially implemented for ExternalStoreDB, other stores
fallback to serial requests.

Change-Id: If1bef25f57bfe7de32fc6787f553a90bd76e87ea
2013-08-05 10:36:53 -07:00
umherirrender
6f79eef473 Fixed spacing around parenthesis in includes
Change-Id: Ie8adc00f4ee8ecec4554e584c18d5d2073415397
2013-04-28 15:50:07 +00:00
umherirrender
892ee7a4af Fixed spacing in db/debug/diff/externalstore/objectcache folder
Added spaces before if, foreach
Added some braces for one line statements

Change-Id: I32a43c547630ce31b6b25cc1bc9eedc50e67b2d7
2013-04-20 22:28:52 +02:00
umherirrender
15abcf71ca Added/Removed spaces around string concatenation
And added/removed spaces around some other tokens,
like +, -, *, /, <, >, =, !

Fixed windows newline style

Change-Id: I0b9c8c408f3f6bfc0d685a074d7ec468fb848fc8
2013-04-13 13:36:24 +02:00
Tyler Anthony Romeo
4dcc7961df Fixed @param tags to conform with Doxygen format.
Doxygen expects parameter types to come before the
parameter name in @param tags. Used a quick regex
to switch everything around where possible. This
only fixes cases where a primitve variable (or a
primitive followed by other types) is the variable
type. Other cases will need to be fixed manually.

Change-Id: Ic59fd20856eb0489d70f3469a56ebce0efb3db13
2013-03-11 13:15:01 -04:00
umherirrender
f97a3a4027 fix some spacing
Change-Id: I670a7baf3ba1e70d18346bb00938d518ba2063bd
2013-02-04 19:59:14 +00:00
Aaron Schulz
a37f67909f [ExternalStore] Refactored external store classes to use a base class.
* Added ExternalStoreMedium base class
* Moved up two functions in ExternalStoreDB
* Various documentation tweaks

Change-Id: I6790aab7799609422e7af4fb31d2ad60610298ec
2013-01-25 15:54:15 -08:00
daniel
d6817311c3 (minor) use wfDebugLog consistently.
ExternalStoreDB used a mixture of wfDebug() and wfDebugLog().

Change-Id: Ifea99cce5accd01bce85b9d877a8d8fc5ddbd98a
2012-12-12 11:45:05 +01:00
Aaron Schulz
cbc28d41ae Moved ExternalStore stuff to a /externalstore subdir.
Change-Id: If631040d8242354734280403258ed5d51542728d
2012-12-10 12:43:42 -08:00
Renamed from includes/ExternalStoreDB.php (Browse further)