BigW Consortium Gitlab

Commit 135c3399 by Kamil Trzciński (OoO till 16th of April) Committed by Filipa Lacerda

Merge branch '45456-improve-performance-of-cicd-jobs-request' into 'master'

Resolve "Concurrent requests to api/v4/jobs/request cause DB locks on ci_builds_metadata table" Closes #45456 See merge request gitlab-org/gitlab-ce!18428
parent 3dac487a
...@@ -162,7 +162,7 @@ module Ci ...@@ -162,7 +162,7 @@ module Ci
build.validates_dependencies! unless Feature.enabled?('ci_disable_validates_dependencies') build.validates_dependencies! unless Feature.enabled?('ci_disable_validates_dependencies')
end end
before_transition pending: :running do |build| after_transition pending: :running do |build|
build.ensure_metadata.update_timeout_state build.ensure_metadata.update_timeout_state
end end
end end
......
...@@ -2140,10 +2140,6 @@ describe Ci::Build do ...@@ -2140,10 +2140,6 @@ describe Ci::Build do
it "doesn't save timeout_source" do it "doesn't save timeout_source" do
expect { run_job_without_exception }.not_to change { job.reload.ensure_metadata.timeout_source } expect { run_job_without_exception }.not_to change { job.reload.ensure_metadata.timeout_source }
end end
it 'raises an exception' do
expect { job.run! }.to raise_error(StateMachines::InvalidTransition)
end
end end
end end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment