Commit graph

10 commits

Author SHA1 Message Date
daniel
2c7e4adcea Don't reset name tables between test runs.
Resetting the content_model and slot_role tables between test runs
requires the corresponding NameTabelStore instances to be reset
as well. We may however have many of them, buried in various services.
There is no easy way to reset them consistently.

Letting information in these tables persist between tests seems
harmless. Tests that need these tables reset can simply add them
to the tablesUsed array.

This is needed for unit tests to work with the new MCR schema.

Bug: T198561
Change-Id: I63e61e1ab74e00c20930a83d3a3f5df53092a197
2018-08-23 19:15:33 +02:00
daniel
63ae40bfad Document cross-wiki cache sharing logic.
This makes explicit the fact that some classes can use the local wiki's default
WANObjectCache instance while still sharing cache entries between wikis.

Bug: T198704
Change-Id: Ic29f79e4b4bd6bdaa844049962a163e72a59c45a
2018-08-02 18:55:41 +00:00
addshore
f5cc67524d Introduce RevisionStoreFactory & Tests
This is based on I0a8a441b803, which was reverted because it was
incomplete.

Bug: T198701
Change-Id: I3e4a5f1ef687418c06dfc979cfe04da336e876b1
2018-08-02 18:55:29 +00:00
Umherirrender
130ec2523d Fix PhanTypeMismatchDeclaredParam
Auto fix MediaWiki.Commenting.FunctionComment.DefaultNullTypeParam sniff

Change-Id: I865323fd0295aabd06f3e3c75e0e5043fb31069e
2018-07-07 00:34:30 +00:00
daniel
53fd8295ff Use consistent caching strategy in Revision storage classes
DEPLOYMENT: This changes the cache key for revision
content blobs. Expect a brief rise in ExternalStore hits.

Bug: T198704
Change-Id: Icc2d16bc5a1e27ba4caea49a784ba7aeac15042a
2018-07-05 17:44:24 +02:00
addshore
f84d47160c Move getFieldsToStore to own method in NameTableStore
In the future this opens up an easy posibility of subclassing
if this is made protected.

Change-Id: I640c9f12f52dbb3328523402d9223ee8c967adda
2018-06-15 07:28:37 +00:00
Amir Sarabadani
20c9b6eb59 Introduce argument for insert callback in NameTableStore
This will be useful in cases we need to define more data
when inserting a new row

Bug: T193868
Change-Id: Ib5c2da2ef951e0bc782847ff8bd4606681ee2196
2018-06-14 15:51:16 +00:00
Aaron Schulz
3b58b6d143 Fix testGetMap_twoValues() failures for sqlite
Change-Id: I3f42208d8e42ba923d4b08bb7efe15f871165899
2018-04-13 14:16:39 -07:00
Aaron Schulz
f8c2486d15 rdbms: rename CONN_TRX_AUTO constant to CONN_TRX_AUTOCOMMIT
The "AUTO" means AUTOCOMMIT, not "automatic transactions"/DBO_TRX,
which is basically the opposite concept. The new name does not
suffer from that ambiguity.

Keep the old constant as an alias for backwards compatibility.

Also remove LoadBalancer comment about non-existing field

Change-Id: I63beeb061fc9be73f320308e4d6393b58628b8c8
2018-04-12 13:01:52 -07:00
addshore
4d3549ad71 [MCR] NameTableStore
General purpose cached store for things like:
 - content_models (id,name)
 - slot_roles (id,name)
And in the future possibly namespaces & content_formats
as mentioned at:
https://www.mediawiki.org/wiki/Multi-Content_Revisions/Schema_Migration#Name_tables

Bug: T188518
Change-Id: Ia550ef7fe30af25ac3fee5ac8a89d032544563bf
2018-03-02 19:48:15 +00:00