-
Notifications
You must be signed in to change notification settings - Fork 117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Alerts: Fix data at watermark boundary is excluded #4348
Conversation
@@ -114,6 +114,10 @@ func (q *ResourceWatermark) resolveMetricsView(ctx context.Context, rt *runtime. | |||
} | |||
|
|||
if !t.IsZero() { | |||
// Hacky workaround for the following issue: the watermark is used as the *exclusive* upper bound for time ranges. | |||
// We need to add a small delta to ensure the row with the watermark is included in the result. | |||
t = t.Add(time.Second) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would just a ms be enough?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried it and it didn't work outright with ClickHouse – apparently they have timestamps at second granularity by default
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a small comment. Otherwise LGTM
* Alerts boundary fix * Alert error info log * Wording * Fix test
Also includes some minor comment and logging improvements in the alerts reconciler.
Closes https://github.com/rilldata/rill-private-issues/issues/198.