-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Fix computation of QueuedQueries JMX metrics #19930
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -189,6 +189,7 @@ protected void setup(Binder binder) | |
|
|
||
| // dispatcher | ||
| binder.bind(DispatchManager.class).in(Scopes.SINGLETON); | ||
| newExporter(binder).export(DispatchManager.class).withGeneratedName(); | ||
|
||
| binder.bind(FailedDispatchQueryFactory.class).in(Scopes.SINGLETON); | ||
| binder.bind(DispatchExecutor.class).in(Scopes.SINGLETON); | ||
| newExporter(binder).export(DispatchExecutor.class).withGeneratedName(); | ||
|
|
||
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.
I actually think
trackQueryStats()methods in QueryManagerStats should NOT doqueuedQueries.incrementAndGet();. Having a query submitted doesn't mean it's already queued. @tdcmeehan Do you know why they were done this way?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.
I agree, that doesn't look right for both the methods. In the case of DispatchQuery, it is queued after the call to trackQueryStats, and in the case of SqlQueryManager, the query is not even in the queued state when trackQueryStats is called. It is called after waiting for resources finishes and query execution is about to start.