Last modified: 2009-10-22 19:24:13 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 T17760, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 15760 - ForeignApiRepo makes calls when it shouldn't
ForeignApiRepo makes calls when it shouldn't
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
File management (Other open bugs)
1.14.x
All All
: Normal normal (vote)
: ---
Assigned To: Chad H.
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-09-29 05:27 UTC by Chad H.
Modified: 2009-10-22 19:24 UTC (History)
2 users (show)

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


Attachments

Description Chad H. 2008-09-29 05:27:45 UTC
If you try to redirect a local image to one on a remote repo (displaying locally, not iw redirects), it doesn't function (another bug entirely).

However, I'm still seeing Http::request()'s for the image's info. For some reason, an invalid redirect is causing the intended target to do various image lookups it shouldn't. Need to find out why and make it go away (useless Http::request calls are baaaaad).
Comment 1 Chad H. 2008-09-30 12:56:44 UTC
Switching component to Images and adding VasilievVV as a CC. From my testing the other evening, it seems like this is a general image redirect issue and not a problem with ForeignApiRepo itself.

Not 100% sure, but I think the target image is getting loaded anyway, even when the redirect doesn't complete...and from the looks of it, several times? Once again, shooting in the dark here, but I think the redirect is being parsed more than once (which wouldn't be ideal, if this is the case).
Comment 2 Chad H. 2008-09-30 13:18:34 UTC
For some reason, FlaggedRevs is having an impact. Without FR, I'm getting 4 calls to Http::request() (I only see the need for one, but anyway...). When I enable FlaggedRevs, I double it, making 8 total Http::request() calls. Here's the selected debug output:

Without FlaggedRevs: 
> Http::request: GET http://commons.wikimedia.org/w/api.php?titles=Image%3ARedirect+to+MC+Steinbock.jpg&iiprop=timestamp%7Cuser%7Ccomment%7Curl%7Csize%7Csha1%7Cmetadata%7Cmime&format=json&action=query&prop=imageinfo
> Http::request: GET http://commons.wikimedia.org/w/api.php?titles=Image%3AMC+Steinbock.jpg&iiprop=timestamp%7Cuser%7Ccomment%7Curl%7Csize%7Csha1%7Cmetadata%7Cmime&format=json&action=query&prop=imageinfo
> Http::request: GET http://commons.wikimedia.org/w/api.php?titles=Image%3AMC_Steinbock.jpg&iiprop=url&iiurlwidth=2000&iiurlheight=-1&format=json&action=query&prop=imageinfo
> Http::request: GET http://upload.wikimedia.org/wikipedia/commons/9/90/MC_Steinbock.jpg

With FlaggedRevs:
> Http::request: GET http://commons.wikimedia.org/w/api.php?titles=Image%3ARedirect+to+MC+Steinbock.jpg&iiprop=timestamp%7Cuser%7Ccomment%7Curl%7Csize%7Csha1%7Cmetadata%7Cmime&format=json&action=query&prop=imageinfo
> Http::request: GET http://commons.wikimedia.org/w/api.php?titles=Image%3AMC+Steinbock.jpg&iiprop=timestamp%7Cuser%7Ccomment%7Curl%7Csize%7Csha1%7Cmetadata%7Cmime&format=json&action=query&prop=imageinfo
> Http::request: GET http://commons.wikimedia.org/w/api.php?titles=Image%3AMC_Steinbock.jpg&iiprop=url&iiurlwidth=2000&iiurlheight=-1&format=json&action=query&prop=imageinfo
> Http::request: GET http://upload.wikimedia.org/wikipedia/commons/9/90/MC_Steinbock.jpg
> Http::request: GET http://upload.wikimedia.org/wikipedia/commons/9/90/MC_Steinbock.jpg
> Http::request: GET http://upload.wikimedia.org/wikipedia/commons/9/90/MC_Steinbock.jpg
> Http::request: GET http://upload.wikimedia.org/wikipedia/commons/9/90/MC_Steinbock.jpg
> Http::request: GET http://upload.wikimedia.org/wikipedia/commons/9/90/MC_Steinbock.jpg

Any clue why FlaggedRevs would ask for the thumb 5 times? I'm also concerned why we're not just returning the locally cached thumb when enabled, but that's on my end...
Comment 3 Chad H. 2008-09-30 13:47:39 UTC
Fwiw, this is partially my problem. I had set CACHE_NONE and expected it to cache something :p

However, the root issue is the same, this many external requests can't be needed...
Comment 4 Chad H. 2009-10-22 19:24:13 UTC
Resolving FIXED. Not nearly as bad as it once was, and caching keeps these external requests to a minimum.

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


Navigation
Links