Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean McGivern <sean@gitlab.com>2019-08-26 16:57:59 +0300
committerSean McGivern <sean@gitlab.com>2019-08-27 16:15:25 +0300
commit7f102819a56b55607e657447b51d2eeb45b2fe94 (patch)
treecd0cbf4d2c45d7beabc2663c00d1b00f5fc83cdc /lib/gitlab/performance_bar
parent7671c592f826f44be5a8a7dc947fba467f5df851 (diff)
Fix Peek on Puma
Peek's `Peek.request_id` method doesn't work well with a multi-threaded server and concurrent requests, because requests can 'steal' another request's ID, or unset it before it was due. The upstream change resolves this; the commit here is just to ensure that GitLab works with that upstream change, mostly by not using `Peek.request_id` any more (as the method doesn't exist).
Diffstat (limited to 'lib/gitlab/performance_bar')
-rw-r--r--lib/gitlab/performance_bar/redis_adapter_when_peek_enabled.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/gitlab/performance_bar/redis_adapter_when_peek_enabled.rb b/lib/gitlab/performance_bar/redis_adapter_when_peek_enabled.rb
index 2d997760c46..9595ced0177 100644
--- a/lib/gitlab/performance_bar/redis_adapter_when_peek_enabled.rb
+++ b/lib/gitlab/performance_bar/redis_adapter_when_peek_enabled.rb
@@ -4,8 +4,8 @@
module Gitlab
module PerformanceBar
module RedisAdapterWhenPeekEnabled
- def save
- super unless ::Peek.request_id.blank?
+ def save(request_id)
+ super if ::Peek.enabled? && request_id.present?
end
end
end