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
This commit is contained in:
commit
5ee5b280b0
3 changed files with 7 additions and 2 deletions
5
changelogs/unreleased/set-higher-ttl-for-trace-write.yml
Normal file
5
changelogs/unreleased/set-higher-ttl-for-trace-write.yml
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
title: Set higher TTL for write lock of trace to prevent concurrent archiving
|
||||||
|
merge_request: 30064
|
||||||
|
author:
|
||||||
|
type: fixed
|
|
@ -5,7 +5,7 @@ module Gitlab
|
||||||
class Trace
|
class Trace
|
||||||
include ::Gitlab::ExclusiveLeaseHelpers
|
include ::Gitlab::ExclusiveLeaseHelpers
|
||||||
|
|
||||||
LOCK_TTL = 1.minute
|
LOCK_TTL = 10.minutes
|
||||||
LOCK_RETRIES = 2
|
LOCK_RETRIES = 2
|
||||||
LOCK_SLEEP = 0.001.seconds
|
LOCK_SLEEP = 0.001.seconds
|
||||||
|
|
||||||
|
|
|
@ -270,7 +270,7 @@ shared_examples_for 'common trace features' do
|
||||||
include ExclusiveLeaseHelpers
|
include ExclusiveLeaseHelpers
|
||||||
|
|
||||||
before do
|
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
|
end
|
||||||
|
|
||||||
it 'blocks concurrent archiving' do
|
it 'blocks concurrent archiving' do
|
||||||
|
|
Loading…
Reference in a new issue