Skip to content
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

Merged
merged 4 commits into from
Mar 15, 2024

Conversation

begelundmuller
Copy link
Contributor

Also includes some minor comment and logging improvements in the alerts reconciler.

Closes https://github.com/rilldata/rill-private-issues/issues/198.

@@ -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)
Copy link
Collaborator

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?

Copy link
Contributor Author

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

Copy link
Collaborator

@AdityaHegde AdityaHegde left a 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

@begelundmuller begelundmuller merged commit eb669f8 into main Mar 15, 2024
4 checks passed
@begelundmuller begelundmuller deleted the begelundmuller/misc-alert-fixes branch March 15, 2024 08:00
nishantmonu51 pushed a commit that referenced this pull request Mar 15, 2024
* Alerts boundary fix

* Alert error info log

* Wording

* Fix test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants