In T233178#5574532, @ArielGlenn wrote:I have found the reason for triple lookups of content; the third lookup, performed from within the Abstract Filter extension, is to determine whether or not the revision is a redirect or not.
- Queries
- All Stories
- Search
- Advanced Search
- Transactions
- Transaction Logs
Feed Advanced Search
Advanced Search
Advanced Search
Oct 15 2019
Oct 15 2019
Thank you for investigating, Ariel!
Oct 14 2019
Oct 14 2019
daniel added a comment to T235188: Preemptive refresh in getMultiWithSetCallback() and getMultiWithUnionSetCallback() pollutes cache.
Pinging Performance-Team since they own WANObjectCache.
daniel added a comment to T235188: Preemptive refresh in getMultiWithSetCallback() and getMultiWithUnionSetCallback() pollutes cache.
I put this up for SWAT in 3 hours: https://gerrit.wikimedia.org/r/c/mediawiki/core/+/542963
Oct 12 2019
Oct 12 2019
The handler for this route doesn't seem to check read permissions for the pages it is comparing. That means it could be used to bypass per-page read permissions. The DifferenceEngine class responsible for showing diffs in the UI does apply these checks, though I note that ApiComparePages seems to be lacking them as well.
Oct 11 2019
Oct 11 2019
On the patch @BPirkle asked:
Thank you Daniel. Was that comment informational, or did you see something we need to change?
daniel added a comment to T234636: Wikimedia Technical Conference 2019 Session: API Integration Testing.
In T234636#5558602, @kostajh wrote:@daniel sure I'd be happy to help!
I've updated the task, making the two of you leaders.
daniel added a comment to T235188: Preemptive refresh in getMultiWithSetCallback() and getMultiWithUnionSetCallback() pollutes cache.
In T235188#5566130, @Verdy_p wrote:Is there any chance that the Memcache server has incorrect clock setting (or NTP failing its updates) ?
In T224949#5565266, @Reedy wrote:I got bored of just kicking the failing test can down the road after 5 supporting backports to REL1_32 and REL1_33 to help this change
daniel added a comment to T235188: Preemptive refresh in getMultiWithSetCallback() and getMultiWithUnionSetCallback() pollutes cache.
In T235188#5566029, @Verdy_p wrote:Another message duplicated:
"<strong>$1</strong> a été effacé."
daniel added a comment to T235188: Preemptive refresh in getMultiWithSetCallback() and getMultiWithUnionSetCallback() pollutes cache.
In T235188#5566008, @Verdy_p wrote:There's somthing strange in your Memcache query; "rev_user_text:" is empty for many ones. Aren't revisions supposed to be associated to a user ?
daniel added a comment to T235188: Preemptive refresh in getMultiWithSetCallback() and getMultiWithUnionSetCallback() pollutes cache.
I'd be very interested to know whether the code in https://gerrit.wikimedia.org/r/542325 would pass on your live system. Of course, the test doesn't use the real cache setup. So to test that, you'd have to run equivalent code in eval.php. This would introduced a handful of orphan rows into the text table each time you run it. Not great, but maybe ok for a one-off?
daniel added a comment to T235188: Preemptive refresh in getMultiWithSetCallback() and getMultiWithUnionSetCallback() pollutes cache.
It seems that we have enough information to pinpoint the cause.
Should this user story mention that unauthorized users should be unable to read this data?
A quick heads up on permission checks when serving content, because I didn't see any permission checks in the patch:
daniel updated subscribers of T235188: Preemptive refresh in getMultiWithSetCallback() and getMultiWithUnionSetCallback() pollutes cache.
A quick search tells me that the new SqlBlobStore::getBlobBatch method is the *only* code that uses WANObjectCache::getMultiWithUnionSetCallback(). So that code hasn't previously been exercised. I suspect it might be buggy. It does have decent test coverage, but still...
daniel added a comment to T235188: Preemptive refresh in getMultiWithSetCallback() and getMultiWithUnionSetCallback() pollutes cache.
In T235188#5564873, @TK-999 wrote:Interesting, I've seen a similar caching issue where revision content got mixed up on a 1.33 wiki with $wgMultiContentRevisionSchemaMigrationStage = SCHEMA_COMPAT_WRITE_BOTH | SCHEMA_COMPAT_READ_NEW;. I haven't yet been able to consistently reproduce it, though.
Oct 10 2019
Oct 10 2019
daniel added a comment to T233092: CI: Create a way to share a secret between MediaWiki and the testing framework..
Has the new version of quibble been deployed everywhere?
Should CI on the api-testing repo now be using the hardcoded secret?
daniel added a comment to T235188: Preemptive refresh in getMultiWithSetCallback() and getMultiWithUnionSetCallback() pollutes cache.
For the record, I still have no clue how the cache gets corrupted, and no good idea for investigating it.
I wonder what the cache keys look like. maybe they are too long, and they get truncated somehow? That would do it.
In T235027#5563431, @Nikerabbit wrote:In T235027#5560244, @daniel wrote:We have seen some mystery problems that may be related... I can't find it right now, @Anomie would know.
Are the mystery problems anything like T235188: Preemptive refresh in getMultiWithSetCallback() and getMultiWithUnionSetCallback() pollutes cache?
daniel added a comment to T235188: Preemptive refresh in getMultiWithSetCallback() and getMultiWithUnionSetCallback() pollutes cache.
Slightly less insane option:
$wgMainWANCache = CACHE_NONE;
daniel added a comment to T235188: Preemptive refresh in getMultiWithSetCallback() and getMultiWithUnionSetCallback() pollutes cache.
@Nikerabbit a hacky way to investigate: in SqlBlobStore::getBlob, rip out the caching code. should look something like this:
daniel added a comment to T235188: Preemptive refresh in getMultiWithSetCallback() and getMultiWithUnionSetCallback() pollutes cache.
In T235188#5563527, @Anomie wrote:@Nikerabbit: Try this:
SELECT rev_text_id, slots.*, content.* FROM revision LEFT JOIN slots ON (slot_revision_id = rev_id) LEFT JOIN content ON(content_id = slot_content_id) WHERE rev_id = 7714145;
daniel added a comment to T235188: Preemptive refresh in getMultiWithSetCallback() and getMultiWithUnionSetCallback() pollutes cache.
When investigating btw, beware that diffs are cached, and there is no simple way to purge that cache.
So even once the actual issue has been fixed, you will see bad diffs.
daniel added a comment to T235188: Preemptive refresh in getMultiWithSetCallback() and getMultiWithUnionSetCallback() pollutes cache.
@Nikerabbit what version are you running? I merged some changes against the Language class the other day. Though I don't see how that would mess with page history.
daniel added a comment to T235188: Preemptive refresh in getMultiWithSetCallback() and getMultiWithUnionSetCallback() pollutes cache.
In T235188#5563482, @Nikerabbit wrote:I'm not sure how the slots and content play role in this, but it seems that it is not corrupted in the text table at least. Where am I supposed to see content_address?
daniel added a comment to T235188: Preemptive refresh in getMultiWithSetCallback() and getMultiWithUnionSetCallback() pollutes cache.
In T235188#5563473, @Verdy_p wrote:Anyway on the affected wikis, some users start getting insulted or banned even if they did not make the breaking changes.
Havoc starts spreading to random places, and the user's history is now definitely wrong for what they really did.
daniel added a comment to T235188: Preemptive refresh in getMultiWithSetCallback() and getMultiWithUnionSetCallback() pollutes cache.
Two things to investigate:
- kill the cache and see if that fixes things
- look at the content_address in the database and the content in the corresponding text row.
daniel added a comment to T235188: Preemptive refresh in getMultiWithSetCallback() and getMultiWithUnionSetCallback() pollutes cache.
If this has anything to do with our changes to SqlBlobStore, my primary suspect is the caching logic. getBlobBatch() uses WANObjectCache::makeMultiKeys and WANObjectCache::getMultiWithUnionSetCallback. If anything went wrong with these cache keys, that would explain your observation.
daniel added a comment to T235188: Preemptive refresh in getMultiWithSetCallback() and getMultiWithUnionSetCallback() pollutes cache.
That does sound scary. But I'm not aware of recent changes to how revision content gets loaded.
We added bulk code, but the code path is nearly entirely separate. They converge in SqlBlobStore::getBlob calling SqlBlobStore::fetchBlobs(). That code landed in master on August 30, see
https://gerrit.wikimedia.org/r/c/mediawiki/core/+/532449. I'm not aware of any change to the "normal" content loading since then. We only worked on the bulk code, as far as I am aware.
daniel updated the task description for T193613: RFC: Establish stable interface policy for PHP code.
In T193613#5561446, @Milimetric wrote:I'm thinking about the generated documentation that may now be confusing to newcomers / people who haven't read this policy yet. For example, if you have two public methods, and one of them is annotated with @stable while the other is not. I would read the documentation and use any public method and expect it to be stable unless something jumped out at me telling me not to make this assumption. So, ideally, docs would color/explain both annotated methods and public methods that are not annotated.
daniel moved T232485: RFC: Core REST API namespace and version from Under discussion to P5: Last Call on the TechCom-RFC board.
Per the TechCom meeting on October 9, this RFC is entering the Last Call period. If there are no pertienent concerns raised and left unaddressed by October 23, this RFC will be approved as proposed.
daniel renamed T235168: Clarify which methods on RevisionStore enforce audience checks when accessing content from WikiPage::getDeletionUpdates pretends to get content with RevisionRecord::RAW but it actually doesn't to Carify which methods on RevisionStore enforce audience checks when accessing content.
daniel added a comment to T235168: Clarify which methods on RevisionStore enforce audience checks when accessing content.
$rev->getSlots() returns raw slots, with no audience checks. So while the parameter in getContent( RevisionRecord::RAW ) is incorrect, the code still does the right thing.
daniel moved T181555: Remove use of PHP serialization in revision storage from Inbox to Triage Meeting Inbox on the Platform Engineering board.
daniel moved T221159: FY18/19 TEC1.6 Q4: Improve or replace the usage of GTID_WAIT with pt-heartbeat in MW from Inbox to Triage Meeting Inbox on the Platform Engineering board.
Not sure what CPT can do here. Tagging for triage.
daniel removed a project from T221159: FY18/19 TEC1.6 Q4: Improve or replace the usage of GTID_WAIT with pt-heartbeat in MW: Patch-For-Review.
Patch was merged, removing the patch for review tag.
Oct 9 2019
Oct 9 2019
Could the opposite happen as well: it would not find the latest revision, and then fetch stale content (penultimate)?
To investigate, any errors reported in the StatusValue returned by the calls to getContentBlobsForBatch() could be logged. We currently just ignore them.
daniel added a comment to T231671: [EPIC] Ensure all direct or indirect access to pre-MCR fields is gated with the MCR migration stage and emits a warning if any pre-MCR schema fields are accessed.
In T231671#5559794, @CCicalese_WMF wrote:@daniel, you now have the epic as a subtask of the user story. It should be the other way around. Are we missing an engineering task here?
In T230607#5559753, @CCicalese_WMF wrote:Does this imply that the current MCR schema migration initiative is focused only on the revision table and that there will need to be a separate page table schema migration activity later?
daniel renamed T235066: Deprecate static FileJournal::factory() from Deprecate statix FileJournal::factory() to Deprecate static FileJournal::factory().
In T233178#5557894, @CCicalese_WMF wrote:
daniel added a comment to T234649: Wikimedia Technical Conference 2019 Session: Front-end modernization and standardization.
In T234649#5558176, @kaldari wrote:
Oct 8 2019
Oct 8 2019
daniel added a comment to T234636: Wikimedia Technical Conference 2019 Session: API Integration Testing.
@kostajh I just volunteered to lead this. Want to be the co-lead?
In T234995#5557541, @Pchelolo wrote:The api-testing has abstractions and some tests set up for Action API, so we would probably need to invest a bit into setting it up for REST API routes as well before we can write actual tests.
One possible concern I have for using it right away is that the REST API seem to not yet be very stable, and moving the tests into a separate repo adds a little bit of overhead when changing the API.. I think we should start off the right track and invest in supporting REST routes in api tester.
In T231588#5557356, @eprodromou wrote:Any thoughts or concerns there?
Please just return the HTML from the default parser.
daniel moved T214267: Name of slots should be localized in diff from Inbox to Backlog on the Platform Team Workboards (Clinic Duty Team) board.
daniel moved T220353: Unable to create redirect on dewiki - fatal DBQueryError from Inbox to Backlog on the Platform Team Workboards (Clinic Duty Team) board.
daniel moved T170184: Refactor anti-spam/vandalism checks out of EditPage.php from Inbox to Backlog on the Platform Team Workboards (Clinic Duty Team) board.
daniel moved T215918: Integration testing for email from Inbox to Backlog on the Platform Team Workboards (Clinic Duty Team) board.
daniel moved T134461: Evaluate increased memtable_cleanup_threshold values from Inbox to Backlog on the Platform Team Workboards (Clinic Duty Team) board.
daniel moved T154240: Update the template's configuration documentation from Inbox to Backlog on the Platform Team Workboards (Clinic Duty Team) board.
daniel moved T202352: Convert MultiHttpClient to use Guzzle from Inbox to Backlog on the Platform Team Workboards (Clinic Duty Team) board.
daniel moved T221763: LinksUpdate fails during page move due to "Title does not belong to page" RevisionStore error from PageImages hook from Inbox to Backlog on the Platform Team Workboards (Clinic Duty Team) board.
Oct 8 2019, 9:57 AM · Wikimedia-production-error, MediaWiki-Page-rename, MW-1.35-notes (1.35.0-wmf.25; 2020-03-24), User-brennen, User-ArielGlenn, Platform Team Initiatives (MCR), MW-1.34-notes (1.34.0-wmf.16; 2019-07-30), MediaWiki-Core-Revision-backend, Platform Team Workboards (Clinic Duty Team), Web-Team-Backlog (Tracking), PageImages, Multi-Content-Revisions (Reactive), Regression
daniel moved T155582: Deprecate Content::getNativeData(), defined TextContent::getText() to replace it. from Inbox to Backlog on the Platform Team Workboards (Clinic Duty Team) board.
Oct 8 2019, 9:57 AM · Patch-Needs-Improvement, MW-1.39-notes (1.39.0-wmf.27; 2022-08-29), MW-1.37-notes (1.37.0-wmf.18; 2021-08-09), Platform Engineering (Icebox), MW-1.34-notes (1.34.0-wmf.3; 2019-04-30), MW-1.33-notes (1.33.0-wmf.24; 2019-04-02), Technical-Debt, User-Daniel, MediaWiki-ContentHandler
daniel moved T227739: Contention on User::getActorId ? from Inbox to Backlog on the Platform Team Workboards (Clinic Duty Team) board.
daniel moved T229137: Create grafana alerts for RESTBase from Inbox to Backlog on the Platform Team Workboards (Clinic Duty Team) board.
daniel moved T151399: Make service-template-node more modular from Inbox to Backlog on the Platform Team Workboards (Clinic Duty Team) board.
daniel moved T176693: Cannot override basePath in the Swagger spec from Inbox to Backlog on the Platform Team Workboards (Clinic Duty Team) board.
daniel moved T228848: Remove trailing newline from log messages from Inbox to Backlog on the Platform Team Workboards (Clinic Duty Team) board.
daniel moved T206032: api_path log property doesn't show the correct domain from Inbox to Backlog on the Platform Team Workboards (Clinic Duty Team) board.
daniel moved T160993: MysqlUpdater::doWatchlistUpdate is very slow from Inbox to Backlog on the Platform Team Workboards (Clinic Duty Team) board.
daniel moved T224209: Orphaned entries in categorylinks from Inbox to Backlog on the Platform Team Workboards (Clinic Duty Team) board.
Content licensed under Creative Commons Attribution-ShareAlike (CC BY-SA) 4.0 unless otherwise noted; code licensed under GNU General Public License (GPL) 2.0 or later and other open source licenses. By using this site, you agree to the Terms of Use, Privacy Policy, and Code of Conduct. · Wikimedia Foundation · Privacy Policy · Code of Conduct · Terms of Use · Disclaimer · CC-BY-SA · GPL