Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-47916

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

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 4.4.0-rc7, 4.7.0
    • 4.4.0-rc3
    • Internal Code
    • None
    • Fully Compatible
    • ALL
    • v4.4
    • Sharding 2020-05-18

    Description

      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.

      Attachments

        Activity

          People

            kaloian.manassiev@mongodb.com Kaloian Manassiev
            kaloian.manassiev@mongodb.com Kaloian Manassiev
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: