Repository navigation
Conversation
CacheDecision::Prefer is defined in crates/ragfs/src/cache/policy.rs and marks high-value objects (.abstract.md, .overview.md, directory entries), but no layer ever consumed it: the cache wrapper only asked the policy for a boolean, so a preferred entry was cached exactly like any other one. Give preferred entries their own TTL through storage.agfs.cachefs .priority_ttl_seconds. The wrapper now passes the admission decision down to the provider write and sets SetOptions.expiration for preferred entries, so a provider that evicts by TTL keeps them longest. The TTL only applies when the cache competes with stateful keys for the same Redis service: QueueFS and PathLock reuse the top-level cache provider, and the expiry scheduler only shares the backend when both configurations point at the same endpoints. With separate Redis services there is nothing to yield to, so the option stays disabled. priority_ttl_seconds defaults to 0, which keeps the current behavior.
1 task done
Author
|
@baojun-zhang this touches the Storage area ( Summary of the change:
Validation: One note: this is a fork PR, so the workflows are sitting at There is one open question in the issue I would like your view on: on a shared backend, should the same "yield to stateful keys" reasoning also shrink |
Adapt prioritized cache TTLs to the query-driven CacheFS runtime introduced on main.
Adapt the shared Redis design to the query-driven CacheFS model. Apply the configured TTL uniformly to query buckets instead of preserving obsolete file-level priority semantics, and document that TTL is not a hard capacity-isolation boundary.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Follow-up to @baojun-zhang's review on #6903. After #6346, CacheFS stores query results rather than file bodies, so the old
.abstract.md/.overview.md/ directory-entry priority model no longer maps to cached objects.This revision drops that obsolete mapping and scopes the config to the shared-backend capacity concern:
storage.agfs.cachefs.shared_redis_ttl_seconds.stat,read_dir,tree_directory,glob_directory,grep).0uses the provider default).maxmemoryor eviction policy.Human Involvement
Related Issue
Fixes #6903
Type of Change
Changes Made
crates/ragfs/src/cache/wrapper.rs: applies the shared-Redis TTL uniformly to query buckets and removes file-level priority matching.crates/ragfs/src/core/builder.rs,mountable.rs, andcrates/ragfs-python/src/lib.rs: propagate the renamed config through the query-driven stack.openviking/utils/agfs_utils.py: enables the override only when the cache shares a Redis backend.openviking_cli/utils/config/agfs_config.py: validatescachefs.shared_redis_ttl_seconds.Testing
Rust compilation could not run on this Windows host because the MSVC linker (
link.exe) is unavailable. The affected Rust blocks were checked withrustfmt --check; the repository-widecargo fmt --checkalready reports unrelated pre-existing formatting differences onmain.Checklist