mirror of
https://mau.dev/maunium/synapse.git
synced 2024-08-24 03:05:48 +00:00
![Sean Quah](/assets/img/avatar_default.png)
When all entries in an `LruCache` have a size of 0 according to the provided `size_callback`, and `drop_from_cache` is called on a cache node, the node would be unlinked from the LRU linked list but remain in the cache dictionary. An assertion would be later be tripped due to the inconsistency. Avoid unintentionally calling `__len__` and use a strict `is None` check instead when unwrapping the weak reference.
2 lines
130 B
Plaintext
2 lines
130 B
Plaintext
Fix an `LruCache` corruption bug, introduced in 1.38.0, that would cause certain requests to fail until the next Synapse restart.
|