These pages https://dpaste.de/Df0x/raw (except for things in namespace 6, which is bug 32551. However that's basically the same bug except for from the runJobs.php entry point instead of api.php entry point)
There's a bunch of pages on commons with no revisions and rev_latest = 0.
I suspect this is caused by differences in uncaught exception handling on the api.php entry point and the index.php entry point.
If there is an open transaction, and then an exception is thrown, but nobody catches it, different things will happen depending on entry point:
*On index.php, transaction will be thrown away (implicitly anyways, basically the shutdown method isn't called)
*On Api.php the following:
$lb = wfGetLBFactory();
$lb->shutdown();
Happens regardless of if there is an uncaught exception, triggering a $dbw->commit even if exception was thrown in middle of transaction.
Version: unspecified
Severity: normal