mirror of
https://git.bsd.gay/fef/nyastodon.git
synced 2025-01-01 01:13:44 +01:00
Remove fetch_value issue logging
Since we've moved back to Ruby 3.1.3 in 9aa172f7df
and the issue only occurs on Ruby 3.2.1 due to the marshaller changing the ordering of instance variables, as explained by byroot / casperisfine in https://github.com/mastodon/mastodon/issues/23644#issuecomment-1472637530.
As such, we no longer need this logging, and should be able to upgrade past Ruby 3.1 once the marshaller does ordering correctly again or Rails is changed to do custom marshalling.
This commit is contained in:
parent
24e9a23fe6
commit
080569b3fd
1 changed files with 1 additions and 19 deletions
|
@ -34,25 +34,7 @@ module CacheConcern
|
|||
raw = raw.cache_ids.to_a if raw.is_a?(ActiveRecord::Relation)
|
||||
return [] if raw.empty?
|
||||
|
||||
cached_keys_with_value = begin
|
||||
Rails.cache.read_multi(*raw).transform_keys(&:id)
|
||||
rescue NoMethodError
|
||||
culprit = raw.find do |item|
|
||||
Rails.cache.read(item)
|
||||
false
|
||||
rescue NoMethodError
|
||||
true
|
||||
end
|
||||
|
||||
Rails.logger.warn "culprit: #{culprit.inspect}"
|
||||
|
||||
cache_key = Rails.cache.send(:normalize_key, culprit, {})
|
||||
entry = Rails.cache.send(:read_entry, cache_key)
|
||||
raw_marshal = Zlib::Inflate.inflate(entry.instance_variable_get(:@value))
|
||||
Rails.logger.warn "base64 marshal: #{Base64.encode64(raw_marshal)}"
|
||||
raise
|
||||
end
|
||||
|
||||
cached_keys_with_value = Rails.cache.read_multi(*raw).transform_keys(&:id)
|
||||
uncached_ids = raw.map(&:id) - cached_keys_with_value.keys
|
||||
|
||||
klass.reload_stale_associations!(cached_keys_with_value.values) if klass.respond_to?(:reload_stale_associations!)
|
||||
|
|
Loading…
Reference in a new issue