Skip to content

Do not call ListStatements in GetQueryID #252

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

Merged
merged 2 commits into from
Oct 4, 2023
Merged

Do not call ListStatements in GetQueryID #252

merged 2 commits into from
Oct 4, 2023

Conversation

iwysiu
Copy link
Contributor

@iwysiu iwysiu commented Sep 29, 2023

This PR stops calling ListStatements in GetQueryID, which was meant to sort of cache async queries instead of calling them multiple times, but can lead to timeouts if there are a lot of statements. This just returns false every time, since it:

a) is not worse than the synchronous solution (if you started multiple identical sync queries they would not check)
b) in retrospect can be (and hopefully is) handled more gracefully in async query caching (where we can cache a queryID for a query using the existing grafana query caching solution)

(note: we're already returning false every time in the Athena datasource for throttling reasons, so we know this works and I probably should have extrapolated from that)

fixes #250

@iwysiu iwysiu marked this pull request as ready for review September 29, 2023 21:13
@iwysiu iwysiu requested a review from a team as a code owner September 29, 2023 21:13
@iwysiu iwysiu merged commit 7da12f9 into main Oct 4, 2023
@iwysiu iwysiu deleted the iwysiu/250 branch October 4, 2023 18:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants