SpringImportJob: don't swallow DBError from doImport() - #1
Open
claude[bot] wants to merge 1 commit into
Open
claude[bot] wants to merge 1 commit into
claude[bot] wants to merge 1 commit into
Conversation
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) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MuStKvs3pWiFUNmf615dgN
|
Important Review skippedBot user detected. To trigger a single review, invoke the ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested via Slack thread
Before:
WikiImporter::doImport()deadlocks on theactortable while acquiring an actor for an imported foreign user (INSERT IGNORE INTO actor ... 'w>Vogone', MySQL 1213). The genericcatch ( Throwable )logs it and returnstrue, so the job is marked done while the transaction is still in ERROR state.JobRunnerthen fails its commit (Commit failed on server(s) db-c1-us-east-021) and the rest of the import is dropped with no retry.After:
DBErrorpropagates out ofrun(). The job runner rolls back, logs, and requeues the job, which is the documented recovery for error 1213. Non-DB import failures keep their existing log-and-give-up behaviour.Sentry: MEDIAWIKI-C74 / C75 / C76.
How
Catch
DBErrorbefore theThrowablehandler inSpringImportJob::run()and rethrow it.🤖 Generated with Claude Code
https://claude.ai/code/session_01MuStKvs3pWiFUNmf615dgN
Generated by Claude Code