RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
Products JSON differs from cached version for distributor: 178, order cycle: 199
app/jobs/products_cache_integrity_checker_job.rb:6 - perform
script/delayed_job:5 - <main>
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
An error linked to this issue has been reopened in Bugsnag
RuntimeError in app/jobs/products_cache_integrity_checker_job.rb:6
Just for reference: we have 488 recorded instances of this product cache error on UK production in the last 30 days, and that's normal... :warning:
We need to assess its severity and fix it as any other bug. Do you guys have any insight?
From what I know:
This report means that there are actions changing products that don't trigger the cache invalidation or there is a gap in the logic that the cache is reported as invalid even though it is valid. I would guess it's the former.
I 90% sure it's a cache invalidation bug.
you know there are only 2 hard things in computer science?
naming things, cache invalidation and off-by-1 errors ;-)
I think you forgot Spree upgrades :trollface:
jokes aside, I'm afraid this might have higher severity than an S4. We need to investigate what are its possible implications.
As a first investigation I looked at the Canadian server because the data is small enough to handle. There are two cache entries out of sync. I looked at failed jobs and there are some that failed because of a missing order cycle. The enterprises of those jobs don't match the invalid cache entries. So it's not their fault.
If I modify a closed order cycle then the cache is not updated. That is how it should work. The admin cache page shows the diff though which is confusing. It should only display cachable order cycles.
The code to check if any errors would be reported to Bugsnag:
Exchange.cachable.map { |ex| OpenFoodNetwork::ProductsCacheIntegrityChecker.new(ex.receiver, ex.order_cycle).ok? }
=> [true, true, true]
# This means it's all good. `false` means an error.
On Aus production we have currently 30 cachable exchanges and one is buggered.
Possibly related:
#2111 and #3629 describe the scenario that deleted variants are not removed from the order cycle. I tested that locally and found that it also breaks the cache. The cache checker thinks that the variant should be removed but it hasn't. I'm not sure if the exchange is still there or not. If it's not there then we can close #2111. Fixing #3629 could solve this cache issue as well but there may be other broken parts that cause it.
Most helpful comment
I think you forgot Spree upgrades :trollface:
jokes aside, I'm afraid this might have higher severity than an S4. We need to investigate what are its possible implications.