mirror of
https://github.com/kvcache-ai/AgentENV.git
synced 2026-11-05 01:17:36 +00:00
[PR #426] [CLOSED] feat(image): reclaim idle source and remote caches #430
Labels
No labels
bug
documentation
enhancement
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
kvcache-ai/AgentENV#430
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/kvcache-ai/AgentENV/pull/426
Author: @guozy18
Created: 10/23/2026
Status: ❌ Closed
Base:
main← Head:sync/image-cache-idle-eviction📝 Commits (1)
5fba3ddfeat: add idle eviction for image caches📊 Changes
13 files changed (+362 additions, -47 deletions)
View changed files
📝
config/default.toml(+4 -0)📝
docs/src/configuration/reference.md(+8 -0)📝
src/cfg.rs(+11 -0)📝
src/cfg/image.rs(+12 -0)📝
src/deps/mod.rs(+4 -1)📝
src/image/cache/graph.rs(+59 -0)📝
src/image/cache/service.rs(+85 -9)📝
src/image/cache/store.rs(+9 -1)📝
src/orchestrator/tests.rs(+1 -1)📝
storage/overlaybd/src/backend/cache/full_file_cache/cache_pool.rs(+81 -20)📝
storage/overlaybd/src/backend/cache/full_file_cache/cache_store.rs(+9 -5)📝
storage/overlaybd/src/backend/cache/tests.rs(+75 -10)📝
storage/overlaybd/src/config.rs(+4 -0)📄 Description
What
Reclaim idle image source configs and closed remote-file cache entries even when cache usage remains below its capacity limit. Both idle thresholds default to zero (disabled).
Why
Capacity eviction alone retains cold image data indefinitely on lightly loaded nodes. Operators can now bound its idle lifetime while retaining the cache and mmap limits already present upstream.
Related issue
No linked issue. This draft implements an independently usable cache lifecycle improvement.
Scope and non-goals
Source configs backed by cache-owned local commits and closed OverlayBD cache entries. Durable snapshots and live writable storage retain their existing ownership rules.
Design and behavior changes
Compatibility and operations
maxIdleSecs.image.cache.gc.max_idle_secsandimage.cache.remote_blocks.max_idle_secs, both0. Existing capacity and open-entry settings remain unchanged.Validation
make fmtequivalent:cargo fmt --all -- --checkmake clippyequivalent:cargo clippy --locked --workspace --all-targets --all-features -- -D warningsCommands and results:
The focused cache tests exercise idle eviction below capacity, live/paused ownership, open handles, refill after eviction, and the existing capacity/mmap cases. Full OSS/P2P and unrelated suites were not run.
Risks and reviewer notes
Short idle thresholds trade disk retention for more image resolution/download work. The source-config policy applies only when image-cache GC is enabled; running holds can keep commit bytes resident until released.
Checklist
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.