NoMethodError: undefined method `search_using_elasticsearch?' for #<Gitlab::FakeApplicationSettings:0x00007fdf55...

There is a moment during a deployment where the DB is in read-only mode and we replace ApplicationSettings with FakeApplicationSettings.

From this sentry report, it looks like it cannot handle search_using_elasticsearch? properly.

https://sentry.gitlab.net/gitlab/gitlabcom/issues/1118725/

NoMethodError: undefined method `search_using_elasticsearch?' for #<Gitlab::FakeApplicationSettings:0x00007fdf55b132d0>
  gitlab/current_settings.rb:20:in `method_missing'
    current_application_settings.send(name, *args, &block) # rubocop:disable GitlabSecurity/PublicSend
  search/elasticsearchable.rb:8:in `use_elasticsearch?'
    ::Gitlab::CurrentSettings.search_using_elasticsearch?(scope: elasticsearchable_scope)
  ee/search/global_service.rb:12:in `execute'
    return super unless use_elasticsearch?
  search_service.rb:48:in `search_results'
    @search_results ||= search_service.execute
  search_controller.rb:28:in `show'
    @search_results = search_service.search_results
...
(125 additional frame(s) were not displayed)

NoMethodError: undefined method `search_using_elasticsearch?' for #<Gitlab::FakeApplicationSettings:0x00007fdf55b132d0>
Assignee Loading
Time tracking Loading