I am trying to update an old database from 1.27 to 1.35. I have updated successfully from 1.27 to 1.31.12, but I now get an error when trying to run the update.php script of 1.35.1. Using 1.35.1, the script crashes with the following error :
Populating archive... Failed to populate content table archive row batch starting at 6289 due to exception: MediaWiki\Storage\BlobAccessException: Unable to fetch blob at tt:6604 in /var/www/html/includes/Storage/SqlBlobStore.php:295
Trying to find an explanation to this, I found the T267468 issue for which @Ammarpad proposed a fix (that's why I assigned the issue to you, hope it's fine, otherwise feel free to redirect). I have downloaded the latest version of populateContentTables.php from gerrit including this fix, and now when running the script I get :
Populating archive... Unable to fetch blob at tt:6604 Failed to populate content table archive row batch starting at 6289 due to exception: RuntimeException: Content row for 6758 not found after content insert in /var/www/html/maintenance/populateContentTables.php:273
If I replace the throw Exception at line 273 with a print, then populate the $slotRows array only if there is not this error, so that I get:
if ( $contentId === false ) {
print ( "Content row for $revisionId not found after content insert" );
} else {
$slotRows[] = [
'slot_revision_id' => $revisionId,
'slot_role_id' => $this->mainRoleId,
'slot_content_id' => $contentId,
// There's no way to really know the previous revision, so assume no inheriting.
// rev_parent_id can get changed on undeletions, and deletions can screw up
// rev_timestamp ordering.
'slot_origin' => $revisionId,
];
}
}The only error I seem to get is for this entry in the database, but otherwise at first sight, the wiki seems to be fine, but I'd like to report it, as I might not be the only one to have the issue and it might be nice to have some advice on how to fix it when the issue arises.