Commit 162ef51f authored by Nick Thomas's avatar Nick Thomas

Merge branch 'sh-disable-reactive-caching-automatic-retries' into 'master'

Prevent amplification of ReactiveCachingWorker jobs upon failures

Closes #64176

See merge request gitlab-org/gitlab-ce!30432
parents 99870258 a28844ea
......@@ -178,7 +178,7 @@ module ReactiveCaching
def enqueuing_update(*args)
yield
ensure
ReactiveCachingWorker.perform_in(self.class.reactive_cache_refresh_interval, self.class, id, *args)
end
end
......
---
title: Prevent amplification of ReactiveCachingWorker jobs upon failures
merge_request: 30432
author:
type: performance
......@@ -206,8 +206,9 @@ describe ReactiveCaching, :use_clean_rails_memory_store_caching do
expect(read_reactive_cache(instance)).to eq("preexisting")
end
it 'enqueues a repeat worker' do
expect_reactive_cache_update_queued(instance)
it 'does not enqueue a repeat worker' do
expect(ReactiveCachingWorker)
.not_to receive(:perform_in)
expect { go! }.to raise_error("foo")
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