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

When creating new Annotation using Azure Data Explorer as datasource, automatically loads all records from the first table causing out of memory failures #796

Closed
MSDkuznetsov opened this issue Feb 16, 2024 · 1 comment · Fixed by #835
Assignees

Comments

@MSDkuznetsov
Copy link

What happened?

When I create new annotation, and select Azure Data Explorer (Kusto) as data source, the query preview window automatically loads the first database and first table and runs a query on it. This means it loads all the records without any limitations exceeding maximum memory allowed if table is large enough.

What did you expect to happen?

When creating new annotations, by default the first load shouldn't be automatic, the user has to click "Test" to trigger it, this is how it works on regular panels right now.

Also it probably makes sense to always have a "| limit XXX" set on all these queries by default to prevent this from causing so much damage.

Did this work before?

don't know, haven't used this before.

How do we reproduce it?

Go to any dashboard
Open Annotations settings
Click "New Query"
Select "Azure Data Explorer" datasource from data source selector
Wait a minute
An exception will appear:
Query execution has exceeded the allowed limits (80DA0001): 'sort' operator has exceeded the memory budget (5368709120) during evaluation. Results may be incorrect or incomplete (E_RUNAWAY_QUERY; see https://aka.ms/kustoquerylimits).. [0]Kusto.Data.Exceptions.KustoServicePartialQueryFailureLimitsExceededException: Query execution has exceeded the allowed limits (80DA0001): 'sort' operator has exceeded the memory budget (5368709120) during evaluation. Results may be incorrect or incomplete (E_RUNAWAY_QUERY; see https://aka.ms/kustoquerylimits)

Environment (with versions)?

Grafana: 9.5.15
OS: Azure Managed Grafana
Browser: Edge

Grafana platform?
Other

Datasource(s)?
Azure Data Explorer

NOTE: This is posted here as well - grafana/grafana#82876

@aangelisc
Copy link
Contributor

Hi @MSDkuznetsov, I've created a PR to rectify this issue. The new behaviour will be to not auto-run a query when the editor is loaded.

@aangelisc aangelisc moved this from Next to In Progress in Partner Datasources Mar 28, 2024
@github-project-automation github-project-automation bot moved this from In Progress to Done in Partner Datasources Apr 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants