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

fix(inputs.sqlserver): Suppress error on secondary replicas #12528

Merged
merged 6 commits into from
Jan 26, 2023

Conversation

deweter
Copy link
Contributor

@deweter deweter commented Jan 20, 2023

Resolves #9530

This PR suppresses an error which we may encounter, if we query sys.dm_exec_requests DMV against a SQL Server hosting secondary replicas.

@telegraf-tiger telegraf-tiger bot added the fix pr to fix corresponding bug label Jan 20, 2023
@srebhan
Copy link
Contributor

srebhan commented Jan 20, 2023

@deweter can you please check why go.sum was changed and if that's correct please run make tidy.

@srebhan srebhan self-assigned this Jan 20, 2023
@srebhan srebhan changed the title fix(inputs.inputs.sqlserver): suppress a SQL Server error on secodary replicas fix(inputs.sqlserver): Suppress error on secondary replicas Jan 20, 2023
@srebhan srebhan added area/sqlserver plugin/input 1. Request for new input plugins 2. Issues/PRs that are related to input plugins labels Jan 20, 2023
@spaghettidba
Copy link
Contributor

I believe that azuresqlmanagedqueries.go should be changed as well, since managed instances can be part of AGs.

@powersj powersj added the waiting for response waiting for response from contributor label Jan 23, 2023
@deweter
Copy link
Contributor Author

deweter commented Jan 24, 2023

I believe that azuresqlmanagedqueries.go should be changed as well, since managed instances can be part of AGs.

@spaghettidba - I changed it. Initially, I skipped it as I didn't test it, but in general I do agree that the error could appear most probably there too.

@deweter can you please check why go.sum was changed and if that's correct please run make tidy.

@srebhan - Sorry, my mistake - I removed a change to go.sum

@telegraf-tiger telegraf-tiger bot removed the waiting for response waiting for response from contributor label Jan 24, 2023
@telegraf-tiger
Copy link
Contributor

@srebhan
Copy link
Contributor

srebhan commented Jan 26, 2023

@spaghettidba and @Trovalo any comments?

@srebhan srebhan requested a review from Trovalo January 26, 2023 10:46
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.

Code-wise this looks good to me. Waiting for @Trovalo's ok on this...

@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 Jan 26, 2023
@powersj powersj merged commit 7e87a25 into influxdata:master Jan 26, 2023
srebhan pushed a commit that referenced this pull request Jan 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/sqlserver fix pr to fix corresponding bug 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.

SQLServer Plugin: Throwing Errors when HADR DB Not Readable
5 participants