Commit graph

7 commits

Author SHA1 Message Date
Aaron Schulz
14ee3f2107 rdbms: specify DB name and table prefix even for the local domain
When LoadBalancer opens new local domain connections, it currently
assumes that the domain specified by the server info array is the
same. For sanity, make sure that the handle is set to the local
domain.

The main LBFactory/LoadBalancer use $wgDBname/$wgDBprefix as the
local domain, corresponding with wfWikiId(). This relation is set
automatically in MWLBFactory. If $wgLBFactoryConf/$wgDBservers is
manually configured in a way breaking this correspondance, then it
is misconfigured.

Fixes made to avoid test failure:
* Make sure LoadBalancer::setDomainPrefix() updates the local
  domain alias member. Also do not bother changing the domain of
  foreign connections.
* Use the right domain ID for the connection array key names in
  LoadBalancer::openForeignConnection().
* Now that JobQueueTest no longer mistakenly uses the non-test
  tables, force it to use the main DB_MASTER handle so that it can
  see the unit test tables even if they are TEMPORARY; such tables
  are tied to the TCP connection, so separate handles see different
  temporary tables.

Change-Id: I56f8b32fe957f984b8c9753e6db3b20abe96b038
2018-01-16 17:06:52 +00:00
addshore
90ca759f15 RevisionStore, fix loadSlotContent with no $blobFlags
This includes tests that were previously created in:
I6dcfc0497bfce6605fa5517c9f91faf7131f4334

Bug: T184749
Change-Id: Ieb02ac593fc6b42af1692d03d9d578a76417eb54
2018-01-12 14:48:07 +00:00
daniel
6d52a7241a [MCR] Improve documentation and method naming on Revision and RevisionStore.
Change-Id: I3b049acff9313814a4ac448289d1aef88cb7f9df
2018-01-08 12:50:10 +00:00
addshore
afe3d071a9 [MCR] fix RevisionStore::checkDatabaseWikiId for DB names with dashes.
This is a quick hack, for a proper solution see I6a98684af1d7

Bug: T183914
Change-Id: I45a151a332145438c484e02bbe96cd85dd602b9e
2018-01-04 17:18:41 +00:00
Kunal Mehta
54640d4d4e Add @covers tags for RevisionStoreDbTest
Change-Id: Ie7ce23d5ad67816c1ae8c2c838f8263fca17b4f8
2017-12-27 17:43:50 +00:00
Kunal Mehta
471ec51c93 Fix @covers tags to use absolute class names in Storage tests
PHPUnit doesn't support use statements when evaluating @covers tags.

Change-Id: I7f649afd3e417a6b71b2f61c6ff59be5f404be8f
2017-12-14 19:20:51 -08:00
addshore
06127159e8 [MCR] Tests for RevisionStore & Related classes
Code introduced in:
I140f43a6fb443b38483f41f268c906b9cea64cf7

Change-Id: Iefad870baf2d16f12e9901b303246c64d6431ca6
2017-12-14 13:44:55 +00:00