Follow-up to #7904 and #7944.
#7944 isolates store-bound vector cache entries (CachedIndexReadersKey, LegacyVectorIndexCacheKey) by object-store identity, so credential rotation produces a cache miss and a rebuild against the current store. However, entries from previous store generations are never proactively invalidated:
Proposed direction
- Add time-based expiration (TTL or time-to-idle) for the store-bound, identity-keyed entry types, or a generation-aware invalidation hook when a new object-store identity is first seen for a given index UUID.
- Scope carefully:
IvfIndexStateCacheKey, PartitionEntry, and LegacyIVFPartition entries are store-free and intentionally shared across generations — they must not be expired by this mechanism.
Impact today is bounded (moka capacity + weigher accounting), so this is memory/credential-hygiene rather than a correctness issue.
Follow-up to #7904 and #7944.
#7944 isolates store-bound vector cache entries (
CachedIndexReadersKey,LegacyVectorIndexCacheKey) by object-store identity, so credential rotation produces a cache miss and a rebuild against the current store. However, entries from previous store generations are never proactively invalidated:Arc<ObjectStore>alive (viaScanSchedulerholding a strong ref), so expired credential material (e.g. STS session tokens) remains reachable in process memory for the same duration.MokaCacheBackendconfigures notime_to_live/time_to_idle(rust/lance-core/src/cache/moka.rs— onlymax_capacity+weigher), matching the "no self-healing for 12+ hours" observation in Vector index cache in Session (index_cache/metadata_cache) never invalidates on ObjectStore/credential change, causing indefinite use of stale/expired S3 credentials #7904: after rotation the stale entries are never used again, but they also never age out.Proposed direction
IvfIndexStateCacheKey,PartitionEntry, andLegacyIVFPartitionentries are store-free and intentionally shared across generations — they must not be expired by this mechanism.Impact today is bounded (moka capacity + weigher accounting), so this is memory/credential-hygiene rather than a correctness issue.