From e8d11e963248fada51bdb1ecc59446adccff440f Mon Sep 17 00:00:00 2001 From: Tom Clegg Date: Fri, 30 Jun 2017 10:17:02 -0400 Subject: [PATCH] 11917: Do not clear rails cache at boot time. This seems like a good idea when there is only one process that has access to the cache. However, in real life the crunch1 dispatcher, rake tasks, and the apiserver all share the cache, and they don't all start up at the same time. This means clear() can run while other operations like fetch() are in progress, which is apparently not a supported use. With the Rails file cache, if clear() removes a directory at an inopportune moment, fetch() crashes (see https://dev.arvados.org/issues/11917). Arvados-DCO-1.1-Signed-off-by: Tom Clegg --- services/api/config/environment.rb | 6 ------ 1 file changed, 6 deletions(-) diff --git a/services/api/config/environment.rb b/services/api/config/environment.rb index d4b606dafc..e24eee035c 100644 --- a/services/api/config/environment.rb +++ b/services/api/config/environment.rb @@ -8,9 +8,3 @@ require 'josh_id' # Initialize the rails application Server::Application.initialize! -begin - Rails.cache.clear -rescue Errno::ENOENT => e - # Cache directory does not exist? Then cache is clear, proceed. - Rails.logger.warn "In Rails.cache.clear, ignoring #{e.inspect}" -end -- 2.30.2