Repository navigation
fix(stats): read the device only on demand and keep TRIM and lock counts honest - #58
Merged
Merged
Conversation
…nts honest Review follow-ups for #55: - The sampler reads the block bitmap and node registry only while requests read capacity or cluster data; an idle mount no longer scans the bitmap every 15 seconds. The first request after a quiet period starts a read. - pending_locks counts only Acquire calls whose first attempt found the lock taken, not every uncontended acquire in flight. - TRIM no longer counts EOPNOTSUPP/ENOTTY ranges as discarded. The device is marked unsupported and trim_enabled reports false. A flush the bitmap guard refuses now counts as an error. - Rename the cache stats variable that shadowed the stats package. - The two API integration tests are high priority with Docker/VM TODOs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.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.
Shepherd's non-blocking review items from #55.
-apiis on by default) no longer scans the bitmap every 15s; at 16 TiB × 64 nodes that was ~2200 reads/s. After a quiet period, the first capacity or cluster request returns the old data and starts a read.pending_locksnow means "found the lock taken and retrying".trim_enabled: falseand counts nothing as discarded. Before, ENOTTY counted as success. The integration test asserts this.high, with Docker/VM TODOs.Testing on .68 (same tree): race unit tests for stats/lock/trim/api, lint 0 issues,
TestAPIStatsReportLiveValuesandTestAPIServesHealthOnLoopbackpass.🤖 Generated with Claude Code