-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Broker Query Timeout Metric #11892
Broker Query Timeout Metric #11892
Conversation
Codecov Report
@@ Coverage Diff @@
## master #11892 +/- ##
============================================
- Coverage 61.45% 61.41% -0.05%
+ Complexity 1147 207 -940
============================================
Files 2375 2378 +3
Lines 128500 128875 +375
Branches 19846 19929 +83
============================================
+ Hits 78974 79144 +170
- Misses 43815 44005 +190
- Partials 5711 5726 +15
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 64 files with indirect coverage changes 📣 Codecov offers a browser extension for seamless coverage viewing on GitHub. Try it in Chrome or Firefox today! |
@@ -116,6 +117,9 @@ protected BrokerResponseNative processBrokerRequest(long requestId, BrokerReques | |||
realtimeBrokerRequest, realtimeRoutingTable, timeoutMs); | |||
_failureDetector.notifyQuerySubmitted(asyncQueryResponse); | |||
Map<ServerRoutingInstance, ServerResponse> finalResponses = asyncQueryResponse.getFinalResponses(); | |||
if (asyncQueryResponse.getStatus() == QueryResponse.Status.TIMED_OUT) { | |||
_brokerMetrics.addMeteredTableValue(rawTableName, BrokerMeter.BROKER_RESPONSES_WITH_TIMEOUTS, 1); |
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.
Let's use actual table name (with type) instead of raw table name
@@ -191,6 +192,11 @@ protected BrokerResponse handleRequest(long requestId, String query, @Nullable S | |||
try { | |||
queryResults = _queryDispatcher.submitAndReduce(requestContext, dispatchableSubPlan, queryTimeoutMs, queryOptions, | |||
stageIdStatsMap); | |||
} catch (TimeoutException e) { |
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.
Can you verify if it can throw TimeoutException
?
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.
Yes actually, the query dispatcher throws a timeout exception.
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.
Applied a commit to fix the broker response for timeout case
In the previous comment, I was referring to using the table name (with or without type suffix), but seems all other metrics are tracked under raw table name, I changed it back (the table name in this stage is already the actual table name).
Exposing a new metric to trace broker query timeouts.