Commit graph

43 commits

Author SHA1 Message Date
Alexandre Emsenhuber
3bbda787b8 Added missing GPLv2 headers in some places.
Also made file/class documentation more consistent.

Change-Id: Ic1ba00472ef62fa4fd746f8f590fe694d490ecd9
2012-05-20 17:56:43 +02:00
Alexandre Emsenhuber
61a88f8c18 Pass __METHOD__ to DatabaseBase::begin(), DatabaseBase::commit() and DatabaseBase::rollback() 2012-02-26 17:19:11 +00:00
Sam Reed
76246b9bf5 More return documentation 2012-02-09 21:33:27 +00:00
Alexandre Emsenhuber
312e0aacb6 Added missing __METHOD__ parameter to DatabaseBase::selectField() calls in ExternalStoreDB 2012-01-31 10:22:17 +00:00
Alexandre Emsenhuber
42988dca6d Fix for r98756: $wgDefaultExternalStore can also be a string 2011-10-04 16:51:37 +00:00
Sam Reed
b9ac056140 Merge r97687 2011-10-03 13:19:22 +00:00
Platonides
4960bff13d Make $wgExternalBlobCache a local static variable.
Remove $wgExternalLoadBalancers, unused since r32578 (birth of LBFactory)
2010-08-12 18:25:04 +00:00
Alexandre Emsenhuber
bc6cd4d098 * Document a bit
* Fix some doxygen warnings
2010-01-08 21:35:25 +00:00
Chad Horohoe
b19e37425a Update callers from immediateCommit() to commit(). The former's been deprecated a really long time...Tim did it 45243 revisions ago. 2009-12-14 23:05:35 +00:00
Tim Starling
a462904fbf Small-scale data loss logged on Wikimedia along these lines: invalid URL written to old_text with the user thinking their edit has succeeded. This change should prevent that scenario. 2009-04-30 06:00:01 +00:00
Andrew Garrett
76635cbaf0 Allow storage of blobs to ES on foreign wikis, by calling ExternalStore::storeToForeignDefault, related changes including adding an associative array parameter to the ExternalStore constructor. Currently this parameter is just used to specify on which wiki the external store is wanted, but could be expanded in future. 2009-03-26 13:28:22 +00:00
Tim Starling
f1a352ccf9 * Revert revert r41234 of ES-related changes. The site_stats complaint should be fixed by the transaction added in r41287.
* Fix broken recursion guard in LoadBalancer::reportConnectionError(), which was causing getConnection() to return false on the second and subsequent errors, instead of throwing an exception. Revert incorrect fix r41229/r41230.
2008-09-28 01:42:55 +00:00
Aaron Schulz
4b22cb1c92 Add insertRandom() with failover back. Currently not used just yet. 2008-09-24 18:38:25 +00:00
Brion Vibber
c4bbaf94c0 Revert some recent ES-related changes -- they made behavior much worse when we encountered problems with site_stats updates hanging and stacking up extra open ES connections.
r41230
r41229
r41093
r41091
r41092
r41086
r41063
r40696

Also reverted r41231 which no longer applies
2008-09-24 18:09:22 +00:00
Aaron Schulz
a005e36e67 Uncomment out needed code, PN2 not wanting to save :/ 2008-09-24 16:13:50 +00:00
Aaron Schulz
e4ea50b35e Revert untested code change from r41086. Don't call methods on non-objects, the fatal will stop even with the error catching. 2008-09-24 16:09:06 +00:00
Tim Starling
cd8378a5a6 Revert/rewrite of r40696.
* We used to have parameters to ignore errors, but they're obsolete now that we have exceptions. Implemented ES master failover using exceptions instead. 
* Changing the number of DB connection attempts from 3 to 2 for some random getConnection() calls is almost pointless, adds lots of ugly formal parameters all of the place, and misses the big picture. It should be 2 by default, based on the original rationale. Any reasonable implementation of failover should have zero timeouts per request, by storing state. Changed the default to 2, or 1 if a long timeout is set.
2008-09-21 06:42:46 +00:00
Aaron Schulz
a6242f04d0 Use normal, more patient, connection attempts for master connection here 2008-09-20 08:40:39 +00:00
Aaron Schulz
7b61c1972a ExternalStore tweaks:
* On read, spend less time checking on dead slaves
* Add randomInsert() to ES. This does the cluster picking for us
* Make revision text use randomInsert(). On write, fails-over to other clusters as needed instead of throwing db errors
2008-09-10 12:07:56 +00:00
Alexandre Emsenhuber
087a9f70c5 WARNING: HUGE COMMIT
Doxygen documentation update:
* Changed alls @addtogroup to @ingroup. @addtogroup adds the comment to the group description, but doesn't add the file, class, function, ... to the group like @ingroup does. See for example http://svn.wikimedia.org/doc/group__SpecialPage.html where it's impossible to see related files, classes, ... that should belong to that group.
* Added @file to file description, it seems that it should be explicitely decalred for file descriptions, otherwise doxygen will think that the comment document the first class, variabled, function, ... that is in that file.
* Removed some empty comments
* Removed some ?>

Added following groups:
* ExternalStorage
* JobQueue
* MaintenanceLanguage

One more thing: there are still a lot of warnings when generating the doc.
2008-05-20 17:13:28 +00:00
Siebrand Mazeland
79d5225c0e * remove end of line whitespace
* remove empty lines at end of file
* remove "?>" where still present
2008-04-14 07:45:50 +00:00
Tim Starling
fbfb509df5 * Introduced LBFactory -- an abstract class for configuring database load balancers and connecting to foreign DBs.
* Wrote two concrete implementations. LBFactory_Simple is for general installations. LBFactory_Multi will replace the runtime configuration used on Wikimedia and allow load-balanced connections to any DB. 
* Ported Special:Userrights, CentralAuth and OAI audit to the LBFactory system. 
* Added ForeignDBViaLBRepo, a file repository which uses LBFactory.
* Removed $wgLoadBalancer and $wgAlternateMaster
* Improved the query group concept to allow failover and lag control
* Improved getReaderIndex(), it will now try all servers before waiting, instead of waiting after each.
* Removed the $fail parameter to getConnection(), obsolete. 
* Removed the useless force() function. 
* Abstracted the replication position interface to allow for future non-MySQL support.
* Rearranged Database.php. Added a few debugging features. 
* Removed ancient benet-specific hack from waitForSlave.php
2008-03-30 09:48:15 +00:00
Aryeh Gregor
a15c419b3d Remove ?>'s from files. They're pointless, and just asking for people to mess with the files and add trailing whitespace. (Yes, I looked over every one and reverted those that were bogus. Slash-enter a million times in less worked well enough, although it was a bit mind-numbing.) 2007-06-29 01:19:14 +00:00
Antoine Musso
c771fc9c96 Use Doxygen @addtogroup instead of phpdoc @package && @subpackage 2007-01-20 15:09:52 +00:00
Tim Starling
3005679b0e * Removed lots of explicit require_once statements. The autoloader should theoretically be faster, because it always uses an absolute path, eliminating the need for a search, and it is never called unnecessarily. Absolute paths are also more robust in the face of odd configurations or usage patterns. Moved a few constants around to support this, they always have to be available before the method call.
* Deleted DatabaseMysql.php, no longer necessary, database classes are autoloaded. 
* Moved wfGetMimeMagic() to MimeMagic::singleton()
* Fixed a couple of __CLASS__.'::'.__FUNCTION__ things.
2006-10-03 13:00:52 +00:00
Brion Vibber
0a26267688 Revert to r14512; domas introduced massive breakage with incomplete experimental changes. They will be recommitted when they work. :) 2006-06-01 08:19:02 +00:00
Domas Mituzas
bda0b8e104 Use AutoLoader to load classes:
* remove require_once() throughout whole code, yet left in few places
* move global functions in HttpUtils, ProxyTools, Credits to class methods
* php5 only: __autoload() now used, combined with class->file map and require()
* move initialization of $wgValidSkinNames to Skin::getSkinNames()
* few more changes that will surely break stuff.
2006-06-01 07:22:49 +00:00
Antoine Musso
69689725c1 Switching from phpdoc to doxygen (use less than 32MB of memory).
Run maintenance/mwdocgen.php to generate doc in ./docs/html/ .
2006-04-19 15:46:24 +00:00
Brion Vibber
4d0d2e56e5 Fixed bogus fallback to master in external storage.
It was loading a second time from the slave, *and* the logging code had a typo so didn't show it.
2006-03-14 00:47:58 +00:00
Lupin
11337038b3 removing unused globals and some whitespace cleaning 2006-03-07 01:10:39 +00:00
Domas Mituzas
491173a7e7 *g*, bypass lag checks for external store (as it already fallbacks to master) 2006-01-23 15:28:17 +00:00
Tim Starling
c8b679135c Try the master if a blob is not found in the slave 2006-01-19 03:55:03 +00:00
Tim Starling
679b0e69b8 Option to write text directly to external storage. 2006-01-09 03:16:56 +00:00
Ævar Arnfjörð Bjarmason
a26d5a49d7 * s~\t+$~~ 2006-01-07 13:31:29 +00:00
Ævar Arnfjörð Bjarmason
7bbe971aec * s~ +$~~ 2006-01-07 13:09:30 +00:00
Tim Starling
af47b8260c Ability to set the blobs table name for any server in an external cluster. This would allow, for example, the merging of all external storage for a large wikipedia dump into a single database, with "clusters" distinguished by table name. 2005-10-29 01:41:36 +00:00
Brion Vibber
41d6bf368b * Correct blob caching to reduce redundant blob loads on backups 2005-09-16 12:00:23 +00:00
Tim Starling
46225147f9 removed relic 2005-08-14 16:28:46 +00:00
Tim Starling
65abef703b support for two-part external storage URLs referring to parts of history blobs 2005-08-14 07:18:34 +00:00
Antoine Musso
157861bc31 fix some issues with phpdoc 2005-07-05 21:22:25 +00:00
Jens Frank
aa8d2db46d Make HistoryStub ExternalStore-aware. Renamed external table, so that it can be inside of the same DB for testing purposes 2005-05-23 06:30:29 +00:00
Jens Frank
d2949d9a21 uppercase URL 2005-05-21 10:25:51 +00:00
Jens Frank
ac3b9bd93e Class for storing objects in an external DB cluster 2005-05-21 10:15:39 +00:00