-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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: inconsistencies in sql*Requests queries #10553
Conversation
@powersj @srebhan @denzilribeiro @m82labs |
Do these changes in this PR make changes to the resulting metrics that these queries were creating? |
Download PR build artifacts for linux_amd64.tar.gz, darwin_amd64.tar.gz, and windows_amd64.zip. 🥳 This pull request decreases the Telegraf binary size by -3.56 % for linux amd64 (new size: 137.8 MB, nightly size 142.9 MB) 📦 Click here to get additional PR build artifactsArtifact URLs |
Yes. In particular, current version of the code saves blocking sessions to a #temp table, but when the main query runs, those queries might not be executing or blocking any more. I got wrong results with this code multiple times. |
Would you please file a bug with an example? The biggest hesitation to take code changes like this is when it makes changes to how existing metrics are working and then it breaks other users. If you can document how this improves the current situation and preferrable how it fixes an existing bug that users may be hitting, it is much more likely to get looked at. |
There you go #10741 |
@dupuyjs - do you have any thoughts on making this change? |
Hi folks! Is there anything I can do to move this forward? Tests? Code reviews? |
About those
I had a look at it and it's not a structurally breaking change as the structure of final output does not change, the only difference is how the result is calculated and users won't even notice it. Now:
The problem of having 2 steps is that it makes the extraction async, the list (point 1) might be outdated even after 1ms... meaning the final result can be imprecise (missing some data or having too many) PR:: I'm definitely in favor of this change |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Trovalo thanks for taking a look, that breakdown gives me the confidence I need.
I don't have sqlserver set up so I can't run the integration tests or try this out. @Trovalo and @spaghettidba have you run the tests and/or run telegraf to exercise this new query code? Thanks! |
This code has been in use for a couple of months here on over 200 SqlServer instances and it is more correct and more efficient than the previous code. |
Sounds like sufficient testing! Thanks! |
(cherry picked from commit 141279f)
Required for all PRs:
Fixes: #10741