diff options
author | Stan Hu <stanhu@gmail.com> | 2017-12-27 06:31:05 +0000 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2017-12-27 06:31:05 +0000 |
commit | 0a2597324b24c8f15b324da4df177c93eb8e72d9 (patch) | |
tree | 777a233c42af7a236075278a6edda18d1683bab3 | |
parent | a5a0f3f725c4f5c6d11d33e18493d93e07e53183 (diff) | |
parent | a0ef9ac2fb0dc3985ba4198cf0b801887f310415 (diff) | |
download | gitlab-ce-0a2597324b24c8f15b324da4df177c93eb8e72d9.tar.gz |
Merge branch 'osw-use-atomic-reference-instead-atomic-fixnum' into 'master'
Use Concurrent::AtomicReference instead AtomicFixnum
Closes #41448
See merge request gitlab-org/gitlab-ce!16138
-rw-r--r-- | changelogs/unreleased/osw-use-atomic-reference-instead-atomic-fixnum.yml | 5 | ||||
-rw-r--r-- | lib/gitlab/metrics/method_call.rb | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/changelogs/unreleased/osw-use-atomic-reference-instead-atomic-fixnum.yml b/changelogs/unreleased/osw-use-atomic-reference-instead-atomic-fixnum.yml new file mode 100644 index 00000000000..afb2f55a9f7 --- /dev/null +++ b/changelogs/unreleased/osw-use-atomic-reference-instead-atomic-fixnum.yml @@ -0,0 +1,5 @@ +--- +title: Adjust failure when starting GitLab instance on x86 systems +merge_request: +author: Mike Limansky +type: fixed diff --git a/lib/gitlab/metrics/method_call.rb b/lib/gitlab/metrics/method_call.rb index 329b07af5db..c2f9db56824 100644 --- a/lib/gitlab/metrics/method_call.rb +++ b/lib/gitlab/metrics/method_call.rb @@ -5,7 +5,7 @@ module Gitlab # Class for tracking timing information about method calls class MethodCall @@measurement_enabled_cache = Concurrent::AtomicBoolean.new(false) - @@measurement_enabled_cache_expires_at = Concurrent::AtomicFixnum.new(Time.now.to_i) + @@measurement_enabled_cache_expires_at = Concurrent::AtomicReference.new(Time.now.to_i) MUTEX = Mutex.new BASE_LABELS = { module: nil, method: nil }.freeze attr_reader :real_time, :cpu_time, :call_count, :labels |