Commit graph

8 commits

Author SHA1 Message Date
Aaron Schulz
51945dbca3 Use DB domain in JobQueueGroup and make WikiMap domain ID methods stricter
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
2018-11-07 04:46:56 +00:00
Brad Jorsch
3e9fdfbda5 JobQueueMemory: Actually return values in MappedIterator callback
Change-Id: Ie489d43ba3e9f4a10580716f38ec0f123d9ab5bb
2017-09-12 11:51:47 -04:00
Aaron Schulz
82e2c924e4 Remove "@author Aaron Schulz" annotations
Bug: T139301
Change-Id: Ib5248e8e27d60611c7373bce4b29dd5e85aa3489
2017-06-27 15:24:14 -07: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
Ricordisamoa
7a97368c35 Stop doing $that = $this in includes/jobqueue
Closures support $this as of PHP 5.4

Change-Id: Icf4eb9ffeab410c01c68a031ec6704cd83c2681e
2016-02-10 17:51:47 +00:00
Thiemo Mättig
793dbbb870 More complete, more straightforward JobQueueMemoryTest
I created a basic test yesterday to cover two bugs. Now the test covers
all public methods. I was also able to get rid of the test double.

Change-Id: I53110280e3ef7b7a72d175b11b7fc4ccf1d648b3
2016-01-15 10:28:30 +01:00
Thiemo Mättig
1910da184e Do not return null reference in JobQueueMemory
See Ia5b7a96 and the unrelated error raised there.
https://integration.wikimedia.org/ci/job/mwext-testextension-zend/19682/consoleFull

By writing this simple test I not only found one but two issues.

Bug: T123539
Change-Id: I17ed5b69992aa98ab2384b7a6aafc96b0fcba1ce
2016-01-14 19:19:55 +01:00
Aaron Schulz
3592f8cea3 Add simple JobQueueMemory class for testing
Change-Id: I1acce43dbab3b12393d6dc4675850695c619d88a
2016-01-14 00:23:05 +00:00