diff options
author | Stan Hu <stanhu@gmail.com> | 2019-06-25 14:47:17 -0700 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2019-06-25 15:06:38 -0700 |
commit | d4c87d4dd7a1d7e4d9b38d37b16c85f7326321fc (patch) | |
tree | 7602e6ae05f59d2c2b608ec48242253b71515b6a /spec/services | |
parent | 76889a9956e76e300edc8993048c3cd5c3a24da0 (diff) | |
download | gitlab-ce-d4c87d4dd7a1d7e4d9b38d37b16c85f7326321fc.tar.gz |
Disable Rails SQL query cache when applying service templatessh-service-template-bug
When the SQL query cache is active, the SELECT query for finding
projects to apply service templates returns the same values. This causes
an infinite loop because even though bulk INSERT queries are made, the
cached results never reflect that progress. To fix this, we call
`Project.uncached` around the query to ensure new data is retrieved.
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/63595
Diffstat (limited to 'spec/services')
-rw-r--r-- | spec/services/projects/propagate_service_template_spec.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/services/projects/propagate_service_template_spec.rb b/spec/services/projects/propagate_service_template_spec.rb index f93e5aae82a..2c3effec617 100644 --- a/spec/services/projects/propagate_service_template_spec.rb +++ b/spec/services/projects/propagate_service_template_spec.rb @@ -72,7 +72,7 @@ describe Projects::PropagateServiceTemplate do expect(project.pushover_service.properties).to eq(service_template.properties) end - describe 'bulk update' do + describe 'bulk update', :use_sql_query_cache do let(:project_total) { 5 } before do |