diff --git a/includes/Jobs/SpringImportJob.php b/includes/Jobs/SpringImportJob.php index 272deed..0694be3 100644 --- a/includes/Jobs/SpringImportJob.php +++ b/includes/Jobs/SpringImportJob.php @@ -11,6 +11,7 @@ use MediaWiki\User\UserIdentity; use Throwable; use WikiImporterFactory; +use Wikimedia\Rdbms\DBError; use WikiOasis\Spring\ConfigNames; use WikiOasis\Spring\Services\ImportSources; @@ -73,6 +74,10 @@ public function run(): bool { $this->importerFactory ->getWikiImporter( $status->getValue(), $performer ) ->doImport(); + } catch ( DBError $e ) { + // Let the job runner roll back and retry: swallowing this leaves the + // transaction poisoned and the import silently half-done. + throw $e; } catch ( Throwable $e ) { $logger->error( 'Import of {key} failed: {message}', [ 'key' => $key,