Skip to content

[Bug] Memory cache manager's file-size memo grows without bound #9774

Description

@LuciferYang

Bug description

LocalMemoryCacheManager memoizes file sizes in an unbounded ConcurrentHashMap<String, Long>; the only removal path is prefix invalidation when a CachingFileIO wrapper is fully released. In memory-cache mode (local-cache.enabled without a cache dir), a job reading many distinct whitelisted files (snapshots, manifests, index files — everything not excluded by FileType.isMutable) grows this map without limit: one path-string entry per distinct file for the lifetime of the shared cache manager.

Expected behavior

The memo should be size-bounded: entries are only a fast path to skip one getFileStatus call, so dropping the eldest entry merely costs a re-stat on the next open.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions