summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKamil Trzciński <ayufan@ayufan.eu>2019-06-28 10:39:08 +0000
committerKamil Trzciński <ayufan@ayufan.eu>2019-06-28 10:39:08 +0000
commit5ee5b280b05f63768f359d0b82d5edd490c0e7cd (patch)
tree25d0c35b5acc857ec4551c4064f871b0b2cbe005
parentecb05e59014ffdc2e9b9e933a61684e86f541bf0 (diff)
parent9753a7d2882d7c8efce7b63674f36d78ae3edafb (diff)
downloadgitlab-ce-5ee5b280b05f63768f359d0b82d5edd490c0e7cd.tar.gz
Merge branch 'set-higher-ttl-for-trace-write' into 'master'
Set higher TTL to write lock for traces See merge request gitlab-org/gitlab-ce!30064
-rw-r--r--changelogs/unreleased/set-higher-ttl-for-trace-write.yml5
-rw-r--r--lib/gitlab/ci/trace.rb2
-rw-r--r--spec/support/shared_examples/ci_trace_shared_examples.rb2
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