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

store: Allow enforcing a timeout for SQL queries #2285

Merged
merged 1 commit into from
Mar 19, 2021
Merged

Conversation

lutter
Copy link
Collaborator

@lutter lutter commented Mar 16, 2021

This isn't great since the timeout is set through an environment variable - it would be better to derive it from the overall timeout for GraphQL queries, but that's a little more work.

/// timeout is local, i.e., can only be used within a transaction and
/// will be cleared at the end of the transaction
static ref STATEMENT_TIMEOUT: Option<String> = {
env::var("GRAPH_SQL_STATEMENT_TIMEOUT")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is important, lets document it in environment_variables.md.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is ;)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nevermind me...

@lutter lutter merged commit 6c9735b into master Mar 19, 2021
@lutter lutter deleted the lutter/db-timeout branch March 29, 2021 18:21
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