summary refs log tree commit diff
path: root/changelog.d/11454.bugfix (follow)
Commit message (Collapse)AuthorAgeFilesLines
* 1.49.0rc1Sean Quah2021-12-071-1/+0
|
* Fix `LruCache` corruption bug with a `size_callback` that can return 0 (#11454)Sean Quah2021-11-301-0/+1
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.