Repository navigation
cache/disk: census counts an eviction as never-read from its access state, so boot-scanned entries stop inflating evicted_never_read after a restart - #71
Merged
shreyas-blacksmith merged 3 commits intoNov 2, 2026
Conversation
…tate, so boot-scanned entries stop inflating evicted_never_read after a restart Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
Contributor
|
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
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.


Summary
censusRecorder.OnEvictderivedneverReadfromlastAccess == addedAt. The boot scan seeds every existing file withaddedAt == lastAccess(file mtime; atime is frozen at creation on noatime mounts) andaccessState = itemStateBootScanned, so after a restart every eviction of an untouched pre-existing object counted as never-read: on prod, 13 of 13 evicting tenants showed 100% evicted-unread since the .16 roll. The per-class array already used the access state; the eviction accounting now switches on it:Boot-scanned evictions still count in
evicted_bytes,evicted_entriesand the created-age histogram; they no longer appear as never-read (scalar +bazel_remote_disk_cache_evicted_never_read_{bytes,entries}counters) nor as recently read (evicted_live_bytes, last-read buckets), since the only timestamp they carry is file metadata.TestCensusBootScannedIsUnknownNotNeverReadasserts all of it alongside the class array.Link to Devin session: https://app.devin.ai/sessions/df6c6655558146b9bafe936b062e49e7
Open in Devin Desktop: https://app.devin.ai/desktop/session/df6c6655558146b9bafe936b062e49e7?variant=devin
Requested by: @shreyas-blacksmith
Need help on this PR? Tag
@codesmith-botwith what you need.Need help on this PR? Tag
@codesmith-botwith what you need. (Staging)