Out of order destruction of ValueHandles returned by InvalidatingLRUCache can break the invalidation guarantees

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 4.4.0-rc7, 4.7.0
    • Affects Version/s: 4.4.0-rc3
    • Component/s: Internal Code
    • None
    • Fully Compatible
    • ALL
    • v4.4
    • Sharding 2020-05-18
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      The destructor of InvalidatingLRUCache::StoredValue unconditionally removes entries from the _evictedCheckedOutValues map. This means it is possible that an old ValueHandle, which goes out of scope after a newer value for the same key has been evicted, will remove the newer value from that map. This in turn will prevent such a value from getting invalidated.

      The solution is to only erase from the _evictedCheckedOutValues if the StoredValue corresponds to the same epoch for the key.

            Assignee:
            Kaloian Manassiev
            Reporter:
            Kaloian Manassiev
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: