Last modified: 2014-06-17 23:02:20 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T63939, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 61939 - Flow: Topic-titles not displaying in some topics (disappearing?)
Flow: Topic-titles not displaying in some topics (disappearing?)
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
Flow (Other open bugs)
unspecified
All All
: High normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-02-26 01:53 UTC by Quiddity
Modified: 2014-06-17 23:02 UTC (History)
6 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
screenshot of many topics without titles (131.07 KB, image/png)
2014-02-26 01:53 UTC, Quiddity
Details

Description Quiddity 2014-02-26 01:53:40 UTC
Created attachment 14684 [details]
screenshot of many topics without titles

A number of the topics at Enwiki are displaying without a title. They do not have any title-edits in their history, and were created with titles.

eg. page 2 has mostly empty ones: https://en.wikipedia.org/w/index.php?title=Wikipedia_talk:Flow/Developer_test_page&topiclist_offset-id=rp338uhkrre3jsht&topiclist_offset-dir=fwd&topiclist_limit=10&workflow=rojlgvjchz98pvno
Comment 1 Quiddity 2014-02-26 01:56:35 UTC
If we click "edit title", for any of them, it shows "false" in the edit-area.
eg. https://en.wikipedia.org/w/index.php?title=Wikipedia_talk:Flow/Developer_test_page&topic_postId=royxd2frzdy34tcg&workflow=royxd2frzdy34tcg
Comment 2 Maryana Pinchuk 2014-02-26 21:33:53 UTC
Has this been observed anywhere other than that test page? If not, it's likely some bit of CSS or JS added by a user in the course of testing that's overriding Flow styles.
Comment 3 Quiddity 2014-02-26 21:46:44 UTC
(In reply to Maryana Pinchuk from comment #2)
> Has this been observed anywhere other than that test page? 

Yes, but only in the second topic currently at https://en.wikipedia.org/wiki/Wikipedia_talk:WikiProject_Hampshire 
specifically: https://en.wikipedia.org/w/index.php?title=Wikipedia_talk:Flow/Developer_test_page&workflow=rpgca5e9yyrhoqq5
Comment 5 Matthias Mullie 2014-03-07 13:31:31 UTC
The last ones here seem ok to me. Only the original one still seems to have the problem.

I've done some digging and I assume we failed to fetch the content from ExternalStorage, and cached the incorrect result.

    $ mwscript eval.php --wiki enwiki:

    > $uuid = Flow\Model\UUID::create( 'rp2pfb6ete6pq6fg' );
    > $collection = Flow\Model\PostCollection::newFromId( $uuid );
    > $revision = $collection->getLastRevision();
    > var_dump( $revision );

$revision->content seems to have a false value here. Judging from AbstractRevision.php, the value should either be the full text or an empty string ''.

Since the content is stored in ExternalStorage, it should be fetched via RevisionStorage::mergeExternalContent, which will fetch the content via ExternalStore::batchFetchFromURLs, which can return false. So I'm pretty sure that's where the false comes from. And it looks like we're only caching the value after that.

I've looked at clearing the cache, but has less luck there. It looks like the key the revision is saved at should be enwiki:flow_revision:v4:descendant:rp2pfb6ete6pq6fg:3.0 (I've also tried :pk: instead of :descendant: and :2.0 instead of :3.0, but no luck). Trying to either fetch those keys from cache returns a false, and trying to delete them doesn't change anything. I may be assuming an incorrect cache key here, though. Clearing the cache would only be a stopgap for this particular instance though, and not properly fix the issue.

Any way; to properly fix this, we should (unless someone has a better idea):
* Make it possible to let our backend storage know to our cache-layers to not cache certain data -> the proper fix IMO, but a fair bit of work

Inferior alternatives:
* Cache the real DB return (prior to ExternalStore::batchFetchFromURLs) and do ExternalStore::batchFetchFromURLs afterwards -> probably the easiest fix, but would result in a lot more calls to resolve data from ExternalStore.
* Implement an 2nd ExternalStore::batchFetchFromURLs in AbstractRevision, to retry fetching content in case $revision->content is false -> easy too, but duplicate code, and still unneccessary calls to ExternalStore for the duration of the corrupt cache

Oh, and also: should we still have occurences of $revision->content being false, we should probably make AbstractRevision::getContent return a 'We could not fetch this content' message instead of displaying nothing.
Comment 7 Gerrit Notification Bot 2014-03-18 16:29:04 UTC
Change 119304 had a related patch set uploaded by Matthias Mullie:
(bug 61939) Topic-titles not displaying in some topics (disappearing?)

https://gerrit.wikimedia.org/r/119304
Comment 8 Erik Bernhardson 2014-03-18 16:39:22 UTC
Dug into this with benny last night, fairly sure what happened is:


* Some data models were not in the cache
* Visiting a contributions page loaded cross-wiki data and cached it
* ExternalStore uses per-wiki databases, but flow doesn't take that into account when querying
* As such the data that got cached included blank content


Things we should do:

As matthias mentioned, we need to either remove the bad data from the result set or somehow mark that row as uncachable. 

We should probably also look into having a flowdb created on cluster25 and cluster26 (the insert clusters for ES) and moving all our content over so we have a valid cross-wiki content storage.
Comment 9 Maryana Pinchuk 2014-03-24 18:43:29 UTC
The short-term issue looks to be fixed; moving the longer term solution stuff to Trello: https://trello.com/c/4Oel8VTK/150-improve-caching
Comment 10 Gerrit Notification Bot 2014-05-19 13:59:16 UTC
Change 134089 had a related patch set uploaded by Matthias Mullie:
(bug 61939) Topic-titles not displaying in some topics (disappearing?)

https://gerrit.wikimedia.org/r/134089
Comment 11 Gerrit Notification Bot 2014-05-19 15:11:36 UTC
Change 119304 abandoned by Matthias Mullie:
(bug 61939) Topic-titles not displaying in some topics (disappearing?)

Reason:
Up-to-date patch at https://gerrit.wikimedia.org/r/134089

https://gerrit.wikimedia.org/r/119304
Comment 12 Gerrit Notification Bot 2014-06-10 16:31:26 UTC
Change 134089 merged by jenkins-bot:
(bug 61939) Topic-titles not displaying in some topics (disappearing?)

https://gerrit.wikimedia.org/r/134089

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links