Skip to content
Snippets Groups Projects

Fix bug where projects would appear to be stuck in the forked import state

Merged Stan Hu requested to merge stanhu/gitlab-ce:fix-stuck-forked-project-import into master

A race condition existed between when Rails committed the import_status to started and when the Sidekiq worker forked a project. If this fork were quick, it's possible that the worker would attempt to move into the finished state before the started state took effect.

As mentioned in https://github.com/mperham/sidekiq/wiki/Problems-and-Troubleshooting#cannot-find-modelname-with-id12345, we can either delay the worker to ensure the DB has a chance to update, or use the nice after_commit_queue gem to schedule the task after the state machine commit. See:

Closes #2736 (closed)

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading