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

feat(inputs.sqlserver): Introduce timeout for query execution #12319

Merged
merged 17 commits into from
Dec 6, 2022

Conversation

goswamisandeep
Copy link
Contributor

@goswamisandeep goswamisandeep commented Dec 1, 2022

Required for all PRs

resolves #12321

@goswamisandeep goswamisandeep changed the title Introduce timeout for sql query fix(inputs.sqlserver): Introduce timeout for sql query execution Dec 1, 2022
Copy link
Contributor

@srebhan srebhan left a comment

Choose a reason for hiding this comment

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

@goswamisandeep the code looks quite nice. I have a simplification and a request for more clear names.

plugins/inputs/sqlserver/sqlserver.go Outdated Show resolved Hide resolved
plugins/inputs/sqlserver/sqlserver.go Outdated Show resolved Hide resolved
plugins/inputs/sqlserver/sqlserver.go Outdated Show resolved Hide resolved
@srebhan srebhan self-assigned this Dec 5, 2022
@srebhan srebhan added feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin plugin/input 1. Request for new input plugins 2. Issues/PRs that are related to input plugins area/sqlserver labels Dec 5, 2022
@srebhan srebhan changed the title fix(inputs.sqlserver): Introduce timeout for sql query execution feat(inputs.sqlserver): Introduce timeout for sql query execution Dec 5, 2022
@srebhan srebhan changed the title feat(inputs.sqlserver): Introduce timeout for sql query execution feat(inputs.sqlserver): Introduce timeout for query execution Dec 5, 2022
goswamisandeep and others added 6 commits December 5, 2022 22:41
Co-authored-by: Sven Rebhan <36194019+srebhan@users.noreply.github.com>
Co-authored-by: Sven Rebhan <36194019+srebhan@users.noreply.github.com>
@goswamisandeep goswamisandeep requested review from srebhan and removed request for powersj December 5, 2022 17:24
## Timeout for query execution operation
## Note that the timeout for queries is per query not per gather.
## 0 value means no timeout
# query_timeout = "5s"
Copy link
Contributor

Choose a reason for hiding this comment

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

The value in the example config should show the default value. As-is, this may lead a user to think a 5s timeout is in place by default.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Copy link
Contributor

@srebhan srebhan left a comment

Choose a reason for hiding this comment

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

Please check the comment of @powersj and mine. :-)

plugins/inputs/sqlserver/sqlserver.go Outdated Show resolved Hide resolved
Co-authored-by: Sven Rebhan <36194019+srebhan@users.noreply.github.com>
@telegraf-tiger
Copy link
Contributor

telegraf-tiger bot commented Dec 6, 2022

Copy link
Contributor

@srebhan srebhan left a comment

Choose a reason for hiding this comment

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

Looks good to me. Thanks for your contribution @goswamisandeep!

@srebhan srebhan added the ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review. label Dec 6, 2022
@srebhan srebhan assigned powersj and unassigned srebhan Dec 6, 2022
Copy link
Contributor

@powersj powersj left a comment

Choose a reason for hiding this comment

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

Thanks for putting this together!

@powersj powersj merged commit e441298 into influxdata:master Dec 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/sqlserver feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin plugin/input 1. Request for new input plugins 2. Issues/PRs that are related to input plugins ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[inputs.sqlserver] sqlserver plugin waits indefinitely if sqlservers responds very slow
3 participants