Using domains means thats JobQueueDB has the right value to use for calls
like LoadBalancer::getConnection(). The full domain includes the schema in
the case of Postgres. This makes calls to getConnection() less awkward by
not relying on the fallback logic in reallyOpenConnection() for null schemas.
Make getWikiIdFromDomain/isCurrentWikiDomain account for the schema if it
is both defined and is not simply the generic "mediawiki" schema MediaWiki
uses by default. If all wikis use the default schema, the wiki IDs can get
by with DB/prefix alone, which various config and methods may be built around.
Otherwise, the config callbacks must account for schema and the config must
include it in various wiki domain ID lists to properly disambiguate wikis.
Also, clean up SiteConfiguration::siteFromDB() since it is not meant
to handle schemas unless the callback method was taylored to do so.
Finally, add more comments to DefaultSettings.php about already existing
limitations of wiki domain IDs and their components.
Change-Id: I8d94a650e5c99a19ee50551c5be9544318eb05b1
Find: /isset\(\s*([^()]+?)\s*\)\s*\?\s*\1\s*:\s*/
Replace with: '\1 ?? '
(Everywhere except includes/PHPVersionCheck.php)
(Then, manually fix some line length and indentation issues)
Then manually reviewed the replacements for cases where confusing
operator precedence would result in incorrect results
(fixing those in I478db046a1cc162c6767003ce45c9b56270f3372).
Change-Id: I33b421c8cb11cdd4ce896488c9ff5313f03a38cf
* Remove some creation dates, they are not protected by GPL
* Remove duplicate @defgroup API
* Remove @ingroup from some @file doc comments on class files. It is not
useful to list class files alongside classes in the doxygen module menu.
Add @ingroup to some more class files that had @ingroup on their file,
that was probably the author's intent.
* In PackedOverlayImageGallery, use the file comment as a class comment
* Don't put @defgroup and @file in the same comment. @defgroup makes the
whole doc comment describe the group.
* Instead of putting AnsiTermColorer in two groups, use hierarchical
groups.
Change-Id: If54f6e0b2bc1ea6de42045885cf836ee67b8e961
Most of these are simply changing annotations to reflect
reality. If a function can return false to indicate failure
the @return should indicate it.
Some are fixing preg_match calls, preg match returns 1, 0 or false,
but the functions all claim to return booleans.
This is far from all the incorrect return types in mediawiki, there
are around 250 detected by phan, but have to start somewhere.
Change-Id: I1bbdfee6190747bde460f8a7084212ccafe169ef
Avoid 2 of the 3 queries in doNotifyQueueNonEmpty(), the ones
that register the queue, once such a command has been done in
the request already.
Change-Id: I58553f0c56660f05a3e3000065270baebb8cbb62
Previously, races could cause queues to be seen as empty
and ignored when they actually have jobs in them.
Change-Id: I6cdf5c1fbd33c9ed7982e5d2d494974b1d7e09fd
* On a basic/default install there is only a single wiki
and nothing uses this. Larger wikis would want to use redis.
Change-Id: Ie5bf1a644ae60b2c6ca72b165fa5510113717611
Xhprof generates this data now. Custom profiling of various
sub-function units are kept.
Calls to profiler represented about 3% of page execution
time on Special:BlankPage (1.5% in/out); after this change
it's down to about 0.98% of page execution time.
Change-Id: Id9a1dc9d8f80bbd52e42226b724a1e1213d07af7
I have not found documentation about the @params command, so this seems
not valid.
I have moved the text to the corresponding @param
Change-Id: I443866d602b60570278289e6e24a77d37314cede
* Previously it would keep polling if the hash was empty since
empty and non-existing collections are the same in Redis.
* Also turned off the pointless PHP serialization.
* Bumped the cache version key; this change should be deployed
in all wikis at once, along with updating the runners.
Change-Id: I33dc55bc579bf678f14a5383e9e2c3c35231d599
* This tracks all queue types in one simple location that
can be inspected without using MediaWiki.
Change-Id: I197664b9aa620b29f1400e5a60c55a301348120d