API: Add generator non-continuation data
authorBrad Jorsch <bjorsch@wikimedia.org>
Tue, 20 Sep 2016 21:26:48 +0000 (17:26 -0400)
committerBrad Jorsch <bjorsch@wikimedia.org>
Wed, 21 Sep 2016 19:18:33 +0000 (15:18 -0400)
commitb7f60b9ab81224e4b52551d979d7db7bdb124517
tree6378fd6b32ac4f5a411527b03c77125e390b08b3
parent07292095eb9f2abc8783d930af5fabd390970906
API: Add generator non-continuation data

Some generators (e.g. generator=recentchanges) in their default mode of
operation are particularly prone to not generating the same result set
on subsequent requests due to intervening activity on the wiki adding
new entries to the start of the list. We can mitigate this effect by
allowing such generators to provide "non-continuation" data to be used
if the generator isn't being continued.

ApiQueryRecentChanges and ApiQueryAllRevisions are updated to set this
new property. Other generators can easily be updated in the same way as
needed.

There isn't anything we can do about generators prone to having entries
added at random positions in the list rather than the beginning,
unfortunately.

Bug: T146176
Change-Id: I8308d6aa2c89fd2a85e74c7dd8a0a2a9ec927490
includes/api/ApiContinuationManager.php
includes/api/ApiQuery.php
includes/api/ApiQueryAllRevisions.php
includes/api/ApiQueryRecentChanges.php