Commit graph

58 commits

Author SHA1 Message Date
Tim Starling
e174a4ddfb Abolished $wgDBname as a unique wiki identifier, it doesn't work with the new-fangled feature we call "table prefixes". Instead use wfWikiID() for an identifier containing the DB name and the prefix if there is one, and wfMemcKey() for cache key construction.
Caches for wikis with table prefixes will be lost on upgrade, caches for wikis without table prefixes will be preserved. Custom cache keys in extensions can be migrated at leisure. Extensions which write to core cache keys should be migrated ASAP, as I have done with Special:Makesysop.
2006-10-04 09:06:18 +00:00
Jens Frank
3160394344 (bug 7458) unstub loop 2006-10-03 18:29:50 +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
bf63ffaa2c Committed a bunch of live hacks from Wikimedia servers
A few left, but these don't look too evil
2006-10-02 17:04:13 +00:00
Tim Starling
43b2fb56b6 Merged localisation-work branch:
* Made lines from initialiseMessages() appear as list items during installation
* Moved the bulk of the localisation data from the Language*.php files to the Messages*.php files. Deleted most of the Languages*.php files.
* Introduced "stub global" framework to provide deferred initialisation of core modules. 
* Removed placeholder values for $wgTitle and $wgArticle, these variables will now be null during the initialisation process, until they are set by index.php or another entry point.
* Added DBA cache type, for BDB-style caches. 
* Removed custom date format functions, replacing them with a format string in the style of PHP's date(). Used string identifiers instead of integer identifiers, in both the language files and user preferences. Migration should be transparent in most cases.
* Simplified the initialisation API for LoadBalancer objects.
* Removed the broken altencoding feature.
* Moved default user options and toggles from Language to User. Language objects are still able to define default preference overrides and extra user toggles, via a slightly different interface.
* Don't include the date option in the parser cache rendering hash unless $wgUseDynamicDates is enabled.
* Merged LanguageUtf8 with Language. Removed LanguageUtf8.php. 
* Removed inclusion of language files from the bottom of Language.php. This is now consistently done from Language::factory(). 
* Add the name of the executing maintenance script to the debug log. Start the profiler during maintenance scripts.
* Added "serialized" directory, for storing precompiled data in serialized form.
2006-07-26 07:15:39 +00:00
Tim Starling
b3607055ea Profiling 2006-07-21 15:26:07 +00:00
Antoine Musso
c4cbef35ec static E_STRICT warnings 2006-07-10 15:08:51 +00:00
Tim Starling
2d03f52598 removed obsolete function 2006-06-07 04:17:51 +00:00
Tim Starling
410986abf8 Some initial work on exceptions. More to follow. 2006-06-06 23:07:26 +00:00
Tim Starling
c6f0a73ae0 In fixSlaveDesync.php, don't check slaves that have zero load. 2006-06-03 22:20:31 +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
93a2ad9f84 fname in debug statement (forgot that one yesterday) 2006-05-13 09:57:21 +00:00
Antoine Musso
7ebdb6de89 Revert to r14165 . Did too many changes, didnt even run parserTests (i am bad) 2006-05-11 22:40:38 +00:00
Antoine Musso
acb150a105 a round of static statements 2006-05-11 19:39:50 +00:00
Antoine Musso
bc14eb8045 Replacing var keyword with private / public as we now require PHP5. 2006-05-11 19:10:41 +00:00
Brion Vibber
3c9cf267a1 * (bug 385) Installer support for PostgreSQL, fixes for PG compatibility
Applied from: http://bugzilla.wikimedia.org/attachment.cgi?id=1517&action=view
I haven't tested it with PG personally yet, but it doesn't appear to interfere with other functionality.
2006-04-12 08:15:28 +00:00
Tim Starling
cd11e8b699 Added shortcut calling convention to getConnection(). Modified load balancing to never use zero-load servers, this allows for complete isolation of query groups. Some documentation. Untested except for lint, use with care. 2006-04-11 19:49:46 +00:00
Domas Mituzas
3488efe876 allow bypassing lag checks 2006-01-23 15:27:44 +00:00
Domas Mituzas
44ab92339b miliseconds...
* Do not check master lag
* check just thread counts on SHOW STATUS, less bits on wire, less rows to handle for php
2006-01-10 10:59:09 +00:00
Ævar Arnfjörð Bjarmason
a26d5a49d7 * s~\t+$~~ 2006-01-07 13:31:29 +00:00
Ævar Arnfjörð Bjarmason
d8e90514ab * Documentation: @private => @access private 2006-01-07 12:48:44 +00:00
Antoine Musso
2ca68a256d Clean up unused globals! 2005-12-04 18:27:59 +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
Tim Starling
5ef53bb049 Give informative connection errors more often 2005-10-28 01:08:49 +00:00
Tim Starling
396a109504 Meaningful error message when all servers are busy 2005-10-24 20:38:46 +00:00
Brion Vibber
219094eb01 Committing various live hacks from Wikimedia servers 2005-10-22 20:52:30 +00:00
Tim Starling
0d8eb4c996 Tweaked polling time 2005-09-20 13:37:29 +00:00
Tim Starling
fb784e6cdf Sleep time is highly variable, removing it from the profiling section name 2005-08-23 16:55:54 +00:00
Brion Vibber
f0cd9a8d0e * Add ability to break off certain debug topics into additional log files;
use $wgDebugLogGroups to configure and wfDebugLog() to log.
2005-08-17 20:07:33 +00:00
Tim Starling
34331f8e2a fixed connection error handling 2005-08-14 04:42:55 +00:00
River Tarnell
b817c0c15f merge ORACLE_WORK. sorry, this may break some parts of MySQL, i did not test extensively. 2005-08-02 13:35:19 +00:00
Tim Starling
5c21483236 fixed repeated balancing bug 2005-06-25 13:48:02 +00:00
Tim Starling
0503c59bdf various load balancing tweaks 2005-06-19 02:39:43 +00:00
Brion Vibber
3376d45088 * (bug 2368) Avoid fatally breaking PHP 4.1.2 in a debug line 2005-06-10 01:32:05 +00:00
Tim Starling
a12ce8f747 new load balancing algorithm 2005-06-01 06:18:49 +00:00
Tim Starling
c911354512 bug fix 2005-05-06 03:48:15 +00:00
Tim Starling
6c1ccfd02e Made updateSpecialPages.php more robust to database problems 2005-04-24 08:31:12 +00:00
Tim Starling
073ac49c1b Implemented query group feature, needed for slow queries esp. in 1.4. Hopefully fixed lagged slave mode. Added a simple method to simulate lagged slaves. 2005-04-23 11:49:33 +00:00
Tim Starling
ef3b9225fd Fixed bug causing transactions to not be started all the time 2005-03-27 18:06:44 +00:00
Tim Starling
9969e8ee48 Minor load balancing improvements 2005-01-15 10:13:36 +00:00
Brion Vibber
b464cb7b97 * Fix for load balancing mode, notify if using old settings format 2004-12-06 01:14:53 +00:00
Antoine Musso
ba2afcd9fa Split files and classes in different packages for phpdocumentor. I probably changed some double quotes to single and used function foo () { shema 2004-09-03 23:00:01 +00:00
Antoine Musso
90155b8a97 Changing comments layout preparing for generated documentation with Phpdocumentor 2004-09-02 23:28:24 +00:00
Antoine Musso
3d60242fb5 massive double to single quotes conversion. I have not noticed any bug after a lot of testing 2004-08-22 17:24:50 +00:00
Brion Vibber
1494cd61de Report the database connection failure error message when no server can
be contacted instead of silently ignoring it and dying when unable to use
'false' as an array index.
2004-08-08 01:07:56 +00:00
Tim Starling
d326750130 Fixed bug causing infinite recursion on failure to contact a slave. Some other general rearrangements, extra debug info 2004-08-07 03:53:19 +00:00
Tim Starling
0255658424 improvements to error handling 2004-07-24 08:33:37 +00:00
Tim Starling
1773cd1e76 * Introducing bit field for database parameters
** Database constructor calling sequence, and Database::newFromParams()
** Including flags in the server initialisation structs
** Support for setting appropriate flags from legacy globals in Setup.php
** Moved some defines to Define.php so that they can be used in LocalSettings.php, most importantly the bit field constants

* Changes related to post-parse link colouring
** Turn the link cache back on when using it for updating the links table
** No longer need to call preFill() on page view

* Better synchronisation of slave servers
** Rearranged getConnection()
** System for beginning and committing transactions when multiple connections are open
** wfAbruptExit() commits transactions, wfErrorExit() does not. Various functions changed to use wfErrorAbort()

* Allowed reporting of database errors during deferred updates by moving them above output()
2004-07-24 07:24:04 +00:00
Tim Starling
3dc5684673 debug output, and proper handling of NULL return from masterPosWait(), which occurs if replication is stopped with SLAVE STOP 2004-07-23 12:37:55 +00:00