[bugfix] correct lag calculation#6405
Merged
ruslan-mikhailov merged 5 commits intografana:mainfrom Feb 9, 2026
Merged
Conversation
539479b to
b996093
Compare
b996093 to
e5d3e68
Compare
e5d3e68 to
8152072
Compare
Contributor
|
Excellent job, thank you for fixing these issues! |
oleg-kozlyuk-grafana
approved these changes
Feb 9, 2026
8152072 to
e4849f9
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 this PR does: fixes lag calculation. This PR contains couple of bugfixes:
a. If there was an error on consumption right after the first iteration, we cannot get lag and set it to -1. Note: current code does not return an error, it is a no-op change.
b. if no error and no recorded offset - means no new records, lag is zero.
consumefunction callrecord.Timestamp.Before(cutoff)), we still need to commit these changes. Currently, they are committed only if at least one message was pushed toinst.pushBytes.waitForCatchUp.How it has been tested: unit tests (in the PR) and manual tests.
Manual test case.
Expected result: it is running, but in non-ready state. After it catches up, it becomes ready.
Actual result matches expected results:

Which issue(s) this PR fixes:
Fixes #
Checklist
CHANGELOG.mdupdated - the order of entries should be[CHANGE],[FEATURE],[ENHANCEMENT],[BUGFIX]