Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-7101

Make sure LRUFileCache doesn't lose files

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.5
    • Component/s: Core VCS

      Description

      It seems that in some cases the filesystem file underlying an entry cached by LRUFileCache may be deleted while still in use.

      Proposed scenario for this:

      1. Access to binary D1, which is put in the cache, and a File entry D1F1 is created for its path.
      2. Access to binary D2, which is put in the cache.
      3. But the cache is now full and so D1 is marked as to be removed, and becomes eligible for GC through Framework.trackFile as soon as D1F1 is not referenced anymore.
      4. Access to binary D1, which is refetched and reput in the cache, and a new File entry D1F2 is created for its path.
      5. The GC removes D1F1 therefore provoking the deletion of D1 on the filesystem.
      6. D1F2 now refers to a nonexistent file and the next access will throw FileNotFoundException.

        Attachments

          Activity

            People

            • Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: