Last modified: 2014-03-08 11:00:23 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 T31223, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 29223 - Querying for rvdiffto=prev fails for many revids: "notcached"
Querying for rvdiffto=prev fails for many revids: "notcached"
Status: REOPENED
Product: MediaWiki
Classification: Unclassified
API (Other open bugs)
unspecified
All All
: Low normal with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-05-31 20:50 UTC by Aaron Halfaker
Modified: 2014-03-08 11:00 UTC (History)
10 users (show)

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


Attachments

Description Aaron Halfaker 2011-05-31 20:50:54 UTC
Sending queries to Wikipedia APIs (in many languages) asking for diff fails when requesting several revids at once.  Only the first revid will contain diff information.  All the rest will say "notcached".  


Example1:
http://en.wikipedia.org/w/api.php?action=query&prop=revisions&revids=1564795|2544909|213252&rvprop=ids&format=jsonfm&rvdiffto=prev

Example2:
http://tr.wikipedia.org/w/api.php?action=query&prop=revisions&revids=1564795|2544909|234634&rvprop=ids&format=jsonfm&rvdiffto=prev

Expected behavior:
A diff for every requested revId.

Actual behavior:
A diff for only the first revId and "notcached" for everything else.
Comment 1 Sam Reed (reedy) 2011-05-31 21:05:51 UTC
Works for me

On the first one, I get the diffs for all 3

On the second one, I get diffs for 2, and notcached for the last

Both for logged in and anonymous


And the most it will give you is one uncached diff, per the site config


reedy@fenari:/home/wikipedia/common/php-1.17/maintenance$ php eval.php
> echo $wgAPIMaxUncachedDiffs;
1
Comment 2 Roan Kattouw 2011-05-31 21:08:05 UTC
(In reply to comment #1)
> Works for me
> 
> On the first one, I get the diffs for all 3
> 
> On the second one, I get diffs for 2, and notcached for the last
> 
> Both for logged in and anonymous
> 
> 
> And the most it will give you is one uncached diff, per the site config
> 
Sure. But if you keep refreshing, it should eventually give you all of them, because the uncached ones it generates should be saved to cache, right? Except that's not what happens, and that's what this bug is about.
Comment 3 Sam Reed (reedy) 2011-05-31 21:10:21 UTC
(In reply to comment #2)
> (In reply to comment #1)
> > Works for me
> > 
> > On the first one, I get the diffs for all 3
> > 
> > On the second one, I get diffs for 2, and notcached for the last
> > 
> > Both for logged in and anonymous
> > 
> > 
> > And the most it will give you is one uncached diff, per the site config
> > 
> Sure. But if you keep refreshing, it should eventually give you all of them,
> because the uncached ones it generates should be saved to cache, right? Except
> that's not what happens, and that's what this bug is about.

Nice when people explain things ;)


Cause is simple, the diffs are not even attempted to be cached afterwards by the API
Comment 4 Sam Reed (reedy) 2011-05-31 21:12:05 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > (In reply to comment #1)
> > > Works for me
> > > 
> > > On the first one, I get the diffs for all 3
> > > 
> > > On the second one, I get diffs for 2, and notcached for the last
> > > 
> > > Both for logged in and anonymous
> > > 
> > > 
> > > And the most it will give you is one uncached diff, per the site config
> > > 
> > Sure. But if you keep refreshing, it should eventually give you all of them,
> > because the uncached ones it generates should be saved to cache, right? Except
> > that's not what happens, and that's what this bug is about.
> 
> Nice when people explain things ;)
> 
> 
> Cause is simple, the diffs are not even attempted to be cached afterwards by
> the API

Bleh, the DifferenceEngine doesn't believe it should be cached for whatever reason
Comment 5 Sam Reed (reedy) 2011-05-31 21:14:49 UTC
WHIIIIICCCCHHHH probably means it's not technically an API bug
Comment 6 Roan Kattouw 2011-05-31 21:20:56 UTC
(In reply to comment #5)
> WHIIIIICCCCHHHH probably means it's not technically an API bug
Well presumably diffs viewed through the UI get cached...
Comment 7 Sam Reed (reedy) 2011-05-31 21:24:35 UTC
if ( !is_null( $this->difftotext ) ) {
					$engine = new DifferenceEngine( $title );
					$engine->setText( $text, $this->difftotext );
				} else {
					$engine = new DifferenceEngine( $title, $revision->getID(), $this->diffto );
					$vals['diff']['from'] = $engine->getOldid();
					$vals['diff']['to'] = $engine->getNewid();
				}
				$difftext = $engine->getDiffBody();





	function __construct( $titleObj = null, $old = 0, $new = 0, $rcid = 0,
		$refreshCache = false, $unhide = false )


And then it'll only do it if...

		if ( $this->mOldid && $this->mNewid ) {


So in some cases.

I'll look at looking into it properly later
Comment 8 Mark A. Hershberger 2011-07-16 20:59:27 UTC
(In reply to comment #7)

> I'll look at looking into it properly later

So, it is now "later"... Is this resolved?
Comment 9 Sam Reed (reedy) 2011-07-16 21:07:38 UTC
(In reply to comment #8)
> (In reply to comment #7)
> o
> > I'll look at looking into it properly later
> 
> So, it is now "later"... Is this resolved

One would presume as the bug is still open, it isn't resolved...
Comment 10 Peter Bowman 2014-03-07 22:43:04 UTC
Are there any chances to get this issue solved?
Comment 11 Andre Klapper 2014-03-08 11:00:23 UTC
This is low priority, so providing a patch would help speed up things. See https://www.mediawiki.org/wiki/Developer_access if you are interested.

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


Navigation
Links