Commit graph

77 commits

Author SHA1 Message Date
Tim Starling
92dee9c157 Fix r30240: 2ms is an appropriate default for non-google-patch servers. 30s would be crazy for anyone, luckily it is measured in microseconds, not milliseconds. 2008-01-29 02:55:02 +00:00
Brion Vibber
59d24ac726 Apply live hack from Wikimedia code base: bump load balancer polling scaleback factor from 2 seconds to 30 seconds 2008-01-29 01:23:37 +00:00
Victor Vasiliev
f35b4db3f4 Fix code formatting 2008-01-20 18:42:21 +00:00
Domas Mituzas
46bc6cb16a should have some coffee - one more typo :) 2008-01-12 23:52:46 +00:00
Domas Mituzas
4ddad0e07e damn, how did this typo slip in :) 2008-01-12 23:12:51 +00:00
Domas Mituzas
01ccf55545 Few sanity things for database activity:
* Provide function to COMMIT master connection in case there were any changes
* Use it at cleanup, instead of sending too many COMMITs to all slaves
* Don't acquire master connection, if no updates are to be done
* Don't care about closing database connections, let PHP do that (would close HTTP socket few nanoseconds earlier)
2008-01-12 22:51:16 +00:00
Domas Mituzas
1590c153c8 this profiling section is nearly identical to our already verbose Database::open and dbconnect ones 2008-01-09 23:23:53 +00:00
Aryeh Gregor
e0320af09e Clean up some braces, indentation; add profiling to LoadBalancer::reallyOpenConnection. 2008-01-09 21:40:40 +00:00
Brion Vibber
c40461b255 bug 11453 -- remove spurious $i parameter on getGroupIndex() 2007-09-26 19:38:05 +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
Tim Starling
f4488f8ca0 Remove slave servers from rotation if the slave thread is not running on them 2007-04-25 07:42:14 +00:00
Tim Starling
98bbc8fb3e Revert my own commit r20142, was rubbish. 2007-03-13 16:15:07 +00:00
Tim Starling
df4ad11d29 Bringing foreign connection logic into the core. Committing for test on server. 2007-03-05 12:42:19 +00:00
Brion Vibber
6038f9ed00 * Clean up session checks to better handle the case where the session was
opened during the current request. May help with some caching corner
  cases.
2007-02-05 21:42:48 +00:00
Domas Mituzas
242e459062 wfGetDB() and wfGetDB(DB_SLAVE) would crash if no previous connections were opened. 2007-01-26 13:48:25 +00:00
Antoine Musso
c771fc9c96 Use Doxygen @addtogroup instead of phpdoc @package && @subpackage 2007-01-20 15:09:52 +00:00
Antoine Musso
b144fcb85d Rename constructors to __constructor 2007-01-20 13:34:31 +00:00
Jason Richey
21850be40c moved the status call so it is only called if max_lag is set, since that is the only time it's value is useful. This won't help Wikimedia, but it should help users who are not using multiple DB servers+max_lag 2006-11-29 23:13:59 +00:00
Tim Starling
19ae05f999 Skip load balancing stuff if there is only one server 2006-10-14 06:49:22 +00:00
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