Commit c634e3df authored by Mayra Cabrera's avatar Mayra Cabrera

Merge branch '244847-remove-elasticsearch-cache-ff' into 'master'

Remove ES cache feature flags

See merge request gitlab-org/gitlab!42962
parents 9f1089fd 75e4c9fc
......@@ -150,8 +150,6 @@ module EE
return false unless elasticsearch_indexing?
return true unless elasticsearch_limit_indexing?
return elasticsearch_limited_project_exists?(project) unless ::Feature.enabled?(:elasticsearch_indexes_project_cache, default_enabled: true)
::Gitlab::Elastic::ElasticsearchEnabledCache.fetch(:project, project.id) do
elasticsearch_limited_project_exists?(project)
end
......@@ -161,8 +159,6 @@ module EE
return false unless elasticsearch_indexing?
return true unless elasticsearch_limit_indexing?
elasticsearch_limited_namespaces.exists?(namespace.id) unless ::Feature.enabled?(:elasticsearch_indexes_namespace_cache, default_enabled: true)
::Gitlab::Elastic::ElasticsearchEnabledCache.fetch(:namespace, namespace.id) do
elasticsearch_limited_namespaces.exists?(namespace.id)
end
......
---
name: elasticsearch_indexes_namespace_cache
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/41274
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/244847
group: group::global search
type: development
default_enabled: true
---
name: elasticsearch_indexes_project_cache
introduced_by_url:
rollout_issue_url:
group:
type: development
default_enabled: true
......@@ -395,18 +395,6 @@ RSpec.describe ApplicationSetting do
expect(setting.elasticsearch_indexes_project?(projects.first)).to be(true)
end
context 'when elasticsearch_indexes_project_cache feature flag is disabled' do
before do
stub_feature_flags(elasticsearch_indexes_project_cache: false)
end
it 'does not use the cache' do
expect(::Gitlab::Elastic::ElasticsearchEnabledCache).not_to receive(:fetch)
expect(setting.elasticsearch_indexes_project?(projects.first)).to be(false)
end
end
end
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment