summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2017-07-10 15:55:08 +0000
committerStan Hu <stanhu@gmail.com>2017-07-10 15:55:08 +0000
commitb347749ab886194f34eaab7f6578bfd3d4b4415b (patch)
tree8f63c91ea06cf3a167bb63444d710babac20334e /lib
parent03b0fe6df908db9d9d71f9f1a8e1e492d2719524 (diff)
parentaeb2869f666a73a039b5ac05bc5973547456ee33 (diff)
downloadgitlab-ce-b347749ab886194f34eaab7f6578bfd3d4b4415b.tar.gz
Merge branch '34728-fix-application-setting-created-when-redis-down' into 'master'
Prevent bad data being added to application settings when Redis is unavailable Closes #34728 See merge request !12750
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/current_settings.rb7
1 files changed, 1 insertions, 6 deletions
diff --git a/lib/gitlab/current_settings.rb b/lib/gitlab/current_settings.rb
index 818b3d9c46b..791a3c36476 100644
--- a/lib/gitlab/current_settings.rb
+++ b/lib/gitlab/current_settings.rb
@@ -33,12 +33,7 @@ module Gitlab
def uncached_application_settings
return fake_application_settings unless connect_to_db?
- # This loads from the database into the cache, so handle Redis errors
- begin
- db_settings = ::ApplicationSetting.current
- rescue ::Redis::BaseError, ::Errno::ENOENT
- # In case Redis isn't running or the Redis UNIX socket file is not available
- end
+ db_settings = ::ApplicationSetting.current
# If there are pending migrations, it's possible there are columns that
# need to be added to the application settings. To prevent Rake tasks