AFS_AETHER_NEGATIVE_LOOKUP_TTL_SECS
Deep-dive reference for:
AFS_AETHER_NEGATIVE_LOOKUP_TTL_SECS
Status
active
Type and Default
- Type: integer seconds (
u64, must be> 0). - Default:
5seconds.
What It Does
Controls how long Aether keeps a negative lookup cached.
Negative lookup means: path metadata lookup returned ENOENT (path does not exist).
During this TTL window, repeated lookups for the same missing path can return ENOENT
from Aether’s negative cache instead of re-querying backend metadata.
Runtime Flow
- A path lookup misses in backend metadata (
ENOENT). - Aether inserts that path into negative cache.
- Subsequent lookups for that path hit negative cache and return
ENOENTquickly. - After TTL expiry, lookup probes backend again.
Where It Is Applied
- Parsed from env/config/CLI into
Config.negative_lookup_ttl. - Wired into mount TTL config as
CacheTtlConfig.negative. - Used as
time_to_livefor the fuse adapter’snegative_cache.
Input Surfaces
- Env:
AFS_AETHER_NEGATIVE_LOOKUP_TTL_SECS=<seconds> - Config file:
negative_lookup_ttl_secs = <seconds> - CLI override:
aether mount --negative-lookup-ttl <seconds>
Validation
0is rejected (value must be greater than zero).- Non-numeric values are rejected.
Behavior Notes and Safeguards
- Negative cache is bounded (
max_capacity(50_000)entries). - If a path is now linked locally (for example during rename/replace windows), Aether treats a stale negative entry as invalid, drops it, and retries metadata fetch.
- Negative cache entries are explicitly invalidated by local cache invalidation paths and by mount lifecycle reset/destroy paths.
Tuning Guidance
- Lower value (for example
1):- Faster visibility of newly-created files after prior misses.
- More backend metadata probes.
- Higher value (for example
15or30):- Fewer repeated backend probes for missing paths.
- Longer stale-miss window before re-check.
Primary Implementation Sources
packages/aether/src/config/types/model_defaults.rspackages/aether/src/config/types/apply_env.rspackages/aether/src/config/types/config_resolution.rspackages/aether/src/config/types/file_config_loader.rspackages/aether/src/mount/mount_main.rspackages/afs-fuse3/src/adapter/state/adapter_state.rspackages/afs-fuse3/src/adapter/ops/metadata.rspackages/afs-fuse3/src/adapter/ops/lifecycle.rspackages/afs-fuse3/src/adapter/ops/metadata/tests_lookup_getattr_setattr.rs