summaryrefslogtreecommitdiff
path: root/app/services
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-05-08 15:18:11 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2023-05-08 15:18:11 +0000
commitdcc56fe601580b5d8f6c3da32550c6523f2baff3 (patch)
treef68c28bf7c8715de7242464b344620ae5c394036 /app/services
parent571b02efc9442e73538c3438eb593a83d7807779 (diff)
downloadgitlab-ce-dcc56fe601580b5d8f6c3da32550c6523f2baff3.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/services')
-rw-r--r--app/services/ci/pipelines/add_job_service.rb6
-rw-r--r--app/services/users/activity_service.rb2
2 files changed, 6 insertions, 2 deletions
diff --git a/app/services/ci/pipelines/add_job_service.rb b/app/services/ci/pipelines/add_job_service.rb
index dfbb37cf0dc..1a5c8d0dccf 100644
--- a/app/services/ci/pipelines/add_job_service.rb
+++ b/app/services/ci/pipelines/add_job_service.rb
@@ -18,6 +18,12 @@ module Ci
in_lock("ci:pipelines:#{pipeline.id}:add-job", ttl: LOCK_TIMEOUT, sleep_sec: LOCK_SLEEP, retries: LOCK_RETRIES) do
Ci::Pipeline.transaction do
+ # This is used to reduce the deadlocks when partitioning `ci_builds`
+ # since inserting into this table requires locks on all foreign keys
+ # and we need to lock all the tables in a specific order for the
+ # migration to succeed.
+ Ci::Pipeline.connection.execute('LOCK "ci_pipelines", "ci_stages" IN ROW SHARE MODE;')
+
yield(job)
job.update_older_statuses_retried!
diff --git a/app/services/users/activity_service.rb b/app/services/users/activity_service.rb
index c8f9c28061f..24aa4aa1061 100644
--- a/app/services/users/activity_service.rb
+++ b/app/services/users/activity_service.rb
@@ -41,8 +41,6 @@ module Users
Gitlab::UsageDataCounters::HLLRedisCounter.track_event('unique_active_user', values: user.id)
- return unless Feature.enabled?(:route_hll_to_snowplow_phase3)
-
Gitlab::Tracking.event(
'Users::ActivityService',
'perform_action',