Conversation
swartzn
force-pushed
the
swartzn/feat/add-badgerdb-block-cache-size-config
branch
from
July 20, 2026 21:41
43fb052 to
d3fc58d
Compare
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.
What does this PR do / why do we need it?
Required for all PRs.
These commits allow admins to properly size the block cache for their environment and workload. In local testing, both sync and remote, block cache is forced to evict entries before the job or work can complete. This leads to log messages such as,
These are
BadgerDB's builtin cache diagnostics. TheInfolog shows that everything is fine and that the majority ofworkJournal's entries are retrieved from cache. TheWarnlogs shows less than 40% of entries retrieved are from cache and it might be undersized.In practice block cache could be hard to size but it should be approximately equal to
job creation rate*average job lifespan*bytes per entry.Related Issue(s)
Required when applicable.
Where should the reviewer(s) start reviewing this?
Only required for larger PRs when this may not be immediately obvious.
Are there any specific topics we should discuss before merging?
Not required.
What are the next steps after this PR?
Not required.
Checklist before merging:
Required for all PRs.
When creating a PR these are items to keep in mind that cannot be checked by GitHub actions:
For more details refer to the Go coding standards and the pull request process.