diff options
author | Kamil Trzciński <ayufan@ayufan.eu> | 2019-06-28 10:39:08 +0000 |
---|---|---|
committer | 🤖 GitLab Bot 🤖 <gitlab-bot@gitlab.com> | 2019-06-28 11:21:54 +0000 |
commit | efc9f72c9ffaa76f966b8c162a9d184d7aa1ff18 (patch) | |
tree | 6082f63bf5ac7ea6351cce5f64d7c7840f0e7c0d | |
parent | b028afaede664580e04cddf0dd98faeff28ffbef (diff) | |
download | gitlab-ce-12-1-auto-deploy-0011201.tar.gz |
Merge branch 'set-higher-ttl-for-trace-write' into 'master'12-1-auto-deploy-0011201
Set higher TTL to write lock for traces
See merge request gitlab-org/gitlab-ce!30064
(cherry picked from commit 5ee5b280b05f63768f359d0b82d5edd490c0e7cd)
9753a7d2 Set higher TTL to write lock for traces
-rw-r--r-- | changelogs/unreleased/set-higher-ttl-for-trace-write.yml | 5 | ||||
-rw-r--r-- | lib/gitlab/ci/trace.rb | 2 | ||||
-rw-r--r-- | spec/support/shared_examples/ci_trace_shared_examples.rb | 2 |
3 files changed, 7 insertions, 2 deletions
diff --git a/changelogs/unreleased/set-higher-ttl-for-trace-write.yml b/changelogs/unreleased/set-higher-ttl-for-trace-write.yml new file mode 100644 index 00000000000..9f17172100c --- /dev/null +++ b/changelogs/unreleased/set-higher-ttl-for-trace-write.yml @@ -0,0 +1,5 @@ +--- +title: Set higher TTL for write lock of trace to prevent concurrent archiving +merge_request: 30064 +author: +type: fixed diff --git a/lib/gitlab/ci/trace.rb b/lib/gitlab/ci/trace.rb index dfae260239e..ce5857965bf 100644 --- a/lib/gitlab/ci/trace.rb +++ b/lib/gitlab/ci/trace.rb @@ -5,7 +5,7 @@ module Gitlab class Trace include ::Gitlab::ExclusiveLeaseHelpers - LOCK_TTL = 1.minute + LOCK_TTL = 10.minutes LOCK_RETRIES = 2 LOCK_SLEEP = 0.001.seconds diff --git a/spec/support/shared_examples/ci_trace_shared_examples.rb b/spec/support/shared_examples/ci_trace_shared_examples.rb index f985b2dcbba..ab0550e2613 100644 --- a/spec/support/shared_examples/ci_trace_shared_examples.rb +++ b/spec/support/shared_examples/ci_trace_shared_examples.rb @@ -270,7 +270,7 @@ shared_examples_for 'common trace features' do include ExclusiveLeaseHelpers before do - stub_exclusive_lease_taken("trace:write:lock:#{trace.job.id}", timeout: 1.minute) + stub_exclusive_lease_taken("trace:write:lock:#{trace.job.id}", timeout: 10.minutes) end it 'blocks concurrent archiving' do |