feat(services): reduce list fallback stat for local kv backends#7218
Merged
feat(services): reduce list fallback stat for local kv backends#7218
Conversation
PsiACE
approved these changes
Feb 23, 2026
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.
Which issue does this PR close?
Part of #7062.
Rationale for this change
CompleteLayernow guaranteescontent_lengthfor file entries returned bylist, but backends that don't populate size in lister metadata still trigger per-entry fallbackstatcalls.For local KV-like backends where size is already available at list time, we can fill
content_lengthdirectly in service listers and avoid unnecessary fallbackstatrequests.What changes are included in this PR?
compfs: populate filecontent_lengthfromDirEntry::metadata().len()in lister.dashmap: lister now reuses cachedMetadatainstead of reconstructing metadata from key suffix.mini_moka: lister now reuses cachedMetadata.moka: lister now reuses cachedMetadata.rocksdb: corelistnow returns(key, value_len)and lister sets filecontent_lengthdirectly.sled: corelistnow returns(key, value_len)and lister sets filecontent_lengthdirectly.Are there any user-facing changes?
Yes.
For
compfs,dashmap,mini-moka,moka,rocksdb, andsled, file entries returned bylistnow includecontent_lengthdirectly from lister metadata, which reduces extra fallbackstatrequests.AI Usage Statement
This PR was developed with Codex (GPT-5) assistance.