Skip to content

Do not evict local-only shards under cache_limit - #989

Open
gyanu2507 wants to merge 1 commit into
mosaicml:mainfrom
gyanu2507:fix/cache-limit-skip-local-only
Open

Do not evict local-only shards under cache_limit#989
gyanu2507 wants to merge 1 commit into
mosaicml:mainfrom
gyanu2507:fix/cache-limit-skip-local-only

Conversation

@gyanu2507

Copy link
Copy Markdown

If a stream is created with remote=None, the files under local are the dataset, not a cache. Mixing that with a remote-backed stream and a finite cache_limit let _evict_coldest_shard delete those files, and there is nothing to download them back from.

Eviction now skips shards whose stream has no remote. If the only local shards are local-only, it raises instead of deleting them.

Fixes #988

Streams with remote=None have no copy to restore from, so evicting them under cache_limit is data loss rather than cache reclaim.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Data loss: cache_limit can evict canonical local-only shards when remote=None

1 participant