From 56049308578c7d2b8f2abb6221b2c7edf528050a Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 14 Sep 2026 06:28:05 +0000 Subject: [PATCH] SpringImportJob: don't swallow DBError from doImport() A deadlock on the actor table (ActorStore::acquireActorId, INSERT IGNORE on an imported foreign user) was caught by the generic Throwable handler, which logged and returned true. The job was marked done while the transaction was left in ERROR state, so JobRunner's commit then failed and the remaining import work was dropped without a retry. Rethrow DBError so the job runner rolls back and requeues. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_01MuStKvs3pWiFUNmf615dgN --- includes/Jobs/SpringImportJob.php | 5 +++++ 1 file changed, 5 insertions(+) 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,