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
  • Merge requests
  • !1405

fix(clean-priority): remove job from priority set on clean

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Administrator requested to merge github/fork/finboxio/develop into develop Jul 31, 2019
  • Overview 7
  • Commits 2
  • Pipelines 0
  • Changes 5

Created by: bdentino

First contribution, so apologies if I've missed anything or stepped on any project standards - happy to make updates to the PR as necessary.

I noticed some strange behavior in one of my applications where jobs were not being processed according to priority. I could reproduce reliably in production, but not in a new staging environment so I dug into the repo and checked some of the keys in Redis. Long story short, I found out that whenever I run the cleanJobsInSet script on the waiting jobs it causes the priority set to go wildly out of sync with the jobs list because these jobs aren't being removed, and I believe this was causing new jobs to get inserted into the jobs list at strange indexes. I have a script running in production that periodically cleans up the different states, and once I re-synced by resetting the priority key and removing all jobs the problem was gone.

This fix simply updates the cleanJobsInSet script to remove each job from the priority set if present.

I don't know when the clean feature was introduced, but I wonder if this could have been causing the OPs issues in #733 (closed)?

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/finboxio/develop