Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions includes/Jobs/SpringImportJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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,
Expand Down