Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • B bull
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 175
    • Issues 175
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 9
    • Merge requests 9
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OptimalBits
  • bull
  • Issues
  • #370
Closed
Open
Issue created Nov 09, 2016 by Administrator@rootContributor

Jobs can be processed and left in the `wait` state

Created by: bradvogel

@manast Following the discussion in https://github.com/OptimalBits/bull/pull/359, I found a hazard that I think we should address before releasing a new version: a job can be processed an still left in wait. Here's how:

Time Process A Process B
1 In the regular Bull run loop of Process A, getNextJob moves a job from wait to active
2 In Process B, moveUnlockedJobsToWait happens to run and pick up the job in step 1, and moves it back to wait
3 Process A gets lock on the job (that is now in 'wait') and begins to process it

If there is no other process around to move the job back to active then Process A will complete the job and leave it in wait. This can lead to a data inconsistency.

Assignee
Assign to
Time tracking