diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-05-19 18:44:42 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-05-19 18:44:42 +0300 |
commit | 4555e1b21c365ed8303ffb7a3325d773c9b8bf31 (patch) | |
tree | 5423a1c7516cffe36384133ade12572cf709398d /app/workers/issue_placement_worker.rb | |
parent | e570267f2f6b326480d284e0164a6464ba4081bc (diff) |
Add latest changes from gitlab-org/gitlab@13-12-stable-eev13.12.0-rc42
Diffstat (limited to 'app/workers/issue_placement_worker.rb')
-rw-r--r-- | app/workers/issue_placement_worker.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/app/workers/issue_placement_worker.rb b/app/workers/issue_placement_worker.rb index 5b547ab0c8d..dba791c3f05 100644 --- a/app/workers/issue_placement_worker.rb +++ b/app/workers/issue_placement_worker.rb @@ -3,7 +3,10 @@ class IssuePlacementWorker include ApplicationWorker + sidekiq_options retry: 3 + idempotent! + deduplicate :until_executed, including_scheduled: true feature_category :issue_tracking urgency :high worker_resource_boundary :cpu @@ -17,6 +20,10 @@ class IssuePlacementWorker issue = find_issue(issue_id, project_id) return unless issue + # Temporary disable moving null elements because of performance problems + # For more information check https://gitlab.com/gitlab-com/gl-infra/production/-/issues/4321 + return if issue.blocked_for_repositioning? + # Move the oldest 100 unpositioned items to the end. # This is to deal with out-of-order execution of the worker, # while preserving creation order. @@ -30,7 +37,7 @@ class IssuePlacementWorker leftover = to_place.pop if to_place.count > QUERY_LIMIT Issue.move_nulls_to_end(to_place) - Issues::BaseService.new(nil).rebalance_if_needed(to_place.max_by(&:relative_position)) + Issues::BaseService.new(project: nil).rebalance_if_needed(to_place.max_by(&:relative_position)) IssuePlacementWorker.perform_async(nil, leftover.project_id) if leftover.present? rescue RelativePositioning::NoSpaceLeft => e Gitlab::ErrorTracking.log_exception(e, issue_id: issue_id, project_id: project_id) |