Jackie-Jiang commented on code in PR #19064:
URL: https://github.com/apache/pinot/pull/19064#discussion_r3858208264
##########
pinot-core/src/main/java/org/apache/pinot/core/transport/QueryRouter.java:
##########
@@ -188,9 +188,23 @@ void receiveDataTable(ServerRoutingInstance
serverRoutingInstance, DataTable dat
}
}
- void markServerDown(ServerRoutingInstance serverRoutingInstance, Exception
exception) {
+ /// Marks a server as unavailable for every in-flight query. Called when a
server's channel goes inactive
+ /// ([DataTableHandler]) or a request write to it fails ([ServerChannels]).
Queries submitted with
+ /// `skipUnavailableServers=true` degrade to partial results for this
genuine unavailability; others are failed.
+ void markServerUnavailable(ServerRoutingInstance serverRoutingInstance,
Exception exception) {
for (AsyncQueryResponse asyncQueryResponse :
_asyncQueryResponseMap.values()) {
- asyncQueryResponse.markServerDown(serverRoutingInstance, exception);
+ if (asyncQueryResponse.markServerUnavailable(serverRoutingInstance,
exception)) {
+
_brokerMetrics.addMeteredGlobalValue(BrokerMeter.SERVER_MARKED_DOWN_SKIPPED, 1);
+ }
+ }
+ }
+
+ /// Cancels every in-flight query. Unlike
+ /// [#markServerUnavailable], this always fails the queries even under
`skipUnavailableServers`: all
+ /// channels are being closed so there is no partial data to return.
+ void markServerCancelled(ServerRoutingInstance serverRoutingInstance,
Exception exception) {
Review Comment:
This name is a little bit confusing. It is not cancelled by a server or
cancelling a server. Probably call it `cancelQuery()`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]