fix(iotracing): skip reset diskstat samples#246
Open
pkurunner wants to merge 1 commit into
Open
Conversation
Signed-off-by: yeyangyi <2501210756@stu.pku.edu.cn>
45ccf41 to
85ed10f
Compare
Contributor
Author
|
Checked the failing VM jobs after updating this. ubuntu20 stops in I do not have permission to rerun failed jobs from the fork, but the current failures do not point to this diskstats change. |
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.
Diskstats counters can go backwards after a device reset/recreate. My first patch clamped each field separately, but that can still mix two counter epochs in one sample.
This version treats any backwards field as a reset and drops that interval by returning zero metrics. The next sample is then compared against the new counter epoch, so we avoid both uint64 underflow and misleading partial deltas.
Testing: gofmt -w core/autotracing/iotracing.go
Not run locally: GOOS=linux GOARCH=amd64 go test -c ./core/autotracing is blocked by missing generated capnp files in my local snapshot.