fix(history): align rollups to completed wall-clock minutes - #20
Closed
albertovincenzi wants to merge 1 commit into
Closed
fix(history): align rollups to completed wall-clock minutes#20albertovincenzi wants to merge 1 commit into
albertovincenzi wants to merge 1 commit into
Conversation
Contributor
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.
Problem
The counter task slept for a fixed 60 seconds from process startup and stamped the resulting delta with the current minute. A process started at 12:00:37 therefore measured 12:00:37 through 12:01:37 but stored the whole sample as 12:01:00. Charts and rate calculations received shifted buckets containing parts of two real minutes.
Fix
Dependency
This PR is intentionally based on #13. The reliable checkpoint from that PR must land first so a failed history write cannot advance the sample baseline. Once #13 merges, GitHub can merge this PR as the small follow-up commit shown here.
Review notes for Alice
The exact-boundary case deliberately waits a full minute. Flushing immediately there would create a zero-length sample and move the following delta into the wrong row. The timestamp is also deliberately one minute behind the wake-up boundary because it names the interval that ended at that boundary.
Verification