Last modified: 2014-10-07 06:04:26 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 12394 - rcid cannot be easily retrieved - implementation seems patchy
rcid cannot be easily retrieved - implementation seems patchy
Status: NEW
Product: MediaWiki
Classification: Unclassified
API (Other open bugs)
1.12.x
All All
: Normal enhancement (vote)
: ---
Assigned To: Roan Kattouw
http://en.wikipedia.org/w/api.php?act...
:
Depends on: 17237
Blocks: 27810
  Show dependency treegraph
 
Reported: 2007-12-23 15:21 UTC by Martin Peeks
Modified: 2014-10-07 06:04 UTC (History)
7 users (show)

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


Attachments

Description Martin Peeks 2007-12-23 15:21:22 UTC
If I do a query using the recentchanges list with rctype=new, the rcid is given in the results.  This seems to be the only way to retrieve the rcid for a new page creation using the API, while commonsense might suggest that a query for the first revision of a page (eg http://en.wikipedia.org/w/api.php?action=query&prop=revisions&titles=Judith%20Wood&rvdir=newer&rvlimit=1&rvprop=timestamp|ids ) would show it.

The rcid is needed to construct a URL in order to mark a page patrolled (on en.wikipedia).
Comment 1 Roan Kattouw 2007-12-26 17:36:32 UTC
rcid is only listed in list=recentchanges 'cause it's stored in the recent changes table, and not in the revision table. For regular edits (i.e. edits other than page creations), rcid is also only available through Special:Recentchanges. The [Mark this page patrolled] link is an exception, but as you point out you can get it through list=recentchanges&rctype=new as well. It could be a good idea to add filtering by page title to list=recentchanges though, I'll add that.
Comment 2 Roan Kattouw 2008-02-27 10:29:00 UTC
Added rctitles in r31348. Now you can get the rcid of a page through list=recentchanges&rctitles=Foo
Comment 3 Gurch 2008-11-08 02:47:09 UTC
Using 'rctitles' parameter on en.wikipedia seems to cause timeouts and teal screens of death.
Comment 4 Roan Kattouw 2009-02-04 22:53:57 UTC
(In reply to comment #3)
> Using 'rctitles' parameter on en.wikipedia seems to cause timeouts and teal
> screens of death.
> 

Removed rctitles parameter because of performance concerns in r46823. Patrolling stuff isn't very easy right now, I agree, but fixing bug 17237 should improve that.
Comment 5 Krinkle 2010-08-29 13:04:50 UTC
This one was removed in 1.15 (documentation wasn't updated yet...)

Through the commits related to this one I read that when this was first implemented it would scan the entire recent changes table, hence the slowness if the disired result is far in the back (or perhaps not in it at all).

However, I see in the current database structure there's a seperate column for rc_title.
I'm not sure since when this exists, and/or if it was originally utilized, but when using that in the query (AND WHERE rc_title='Foobar') it'd be like any other condition currently in the recentchanges API right (same thing for rc_user, with $this->addWhereFld(); )

Sorry if this was indeed the way it was already done or if it's not a good way at all, just hoping to get this one fixed :-)
Comment 6 Roan Kattouw 2010-09-12 15:01:00 UTC
(In reply to comment #5)
> However, I see in the current database structure there's a seperate column for
> rc_title.
> I'm not sure since when this exists, and/or if it was originally utilized, but
> when using that in the query (AND WHERE rc_title='Foobar') it'd be like any
> other condition currently in the recentchanges API right (same thing for
> rc_user, with $this->addWhereFld(); )
> 
The original implementation did do a WHERE on rc_namespace and rc_title, yes, but that's not the same as doing a WHERE on rc_user because the latter is indexed. Implementing this feature would require adding an index for it (kinda leery of that) and even then it'd have to sort by namespace, then title, then timestamp in order to work efficiently.
Comment 7 Krinkle 2013-10-06 18:49:22 UTC
(In reply to comment #6)
> (In reply to comment #5)
> > However, I see in the current database structure there's a seperate column for
> > rc_title.
> > I'm not sure since when this exists, and/or if it was originally utilized, but
> > when using that in the query (AND WHERE rc_title='Foobar') it'd be like any
> > other condition currently in the recentchanges API right (same thing for
> > rc_user, with $this->addWhereFld(); )
> > 
> The original implementation did do a WHERE on rc_namespace and rc_title, yes,
> but that's not the same as doing a WHERE on rc_user because the latter is
> indexed. Implementing this feature would require adding an index for it
> (kinda
> leery of that) and even then it'd have to sort by namespace, then title, then
> timestamp in order to work efficiently.

There is a rc_namespace_title index though. But unlike the one for rc_user, it doesn't have rc_timestamp.

mediawiki-core@master:/maintenance/tables.sql:
 INDEX rc_timestamp ON recentchanges (rc_timestamp);
 INDEX rc_namespace_title ON recentchanges (rc_namespace, rc_title);
 INDEX rc_cur_id ON recentchanges (rc_cur_id);
 INDEX new_name_timestamp ON recentchanges (rc_new,rc_namespace,rc_timestamp);
 INDEX rc_ip ON recentchanges (rc_ip);
 INDEX rc_ns_usertext ON recentchanges (rc_namespace, rc_user_text);
 INDEX rc_user_text ON recentchanges (rc_user_text, rc_timestamp);


Would it make sense for rc_namespace_title to have it? I wonder what it is used for and if those uses would have a problem with the extra rc_timestamp sort. The default sort for rc_namespace_title is presumably rc_id which should have be very close to the sort order of rc_timestamp.

The main reason it needs rc_timestamp is not for the sort order, but to be able to do rcstart and rcend.
Comment 8 Krinkle 2013-10-06 18:58:57 UTC
Filed bug 55377 for adding support for rctitles to query=recentchanges.

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


Navigation
Links