When getting the tier-level stats from the new TieredSpilloverCache with GET /_nodes/stats/caches/request_cache?level=tier, the number of misses and evictions reported in the total is sometimes lower than the value you would compute based on the numbers in the individual tiers. For example if the disk tier is enabled, disk tier misses should equal total misses. The correct value is the one in the tiers, as it matches the old API. The discrepancy happens when shards are closed.
Related component
Search
To Reproduce
Set up a cluster using TieredSpilloverCache as its request cache. Make some requests to add misses to the cache. Close some shards. Afterwards, the tier-level and total values reported in the API will not match.
Describe the bug
When getting the tier-level stats from the new TieredSpilloverCache with
GET /_nodes/stats/caches/request_cache?level=tier
, the number of misses and evictions reported in the total is sometimes lower than the value you would compute based on the numbers in the individual tiers. For example if the disk tier is enabled, disk tier misses should equal total misses. The correct value is the one in the tiers, as it matches the old API. The discrepancy happens when shards are closed.Related component
Search
To Reproduce
Set up a cluster using TieredSpilloverCache as its request cache. Make some requests to add misses to the cache. Close some shards. Afterwards, the tier-level and total values reported in the API will not match.
Expected behavior
The stats for tier and total should match.
Additional Details
No response