You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by "klsince (via GitHub)" <gi...@apache.org> on 2024/08/05 20:23:24 UTC
Re: [PR] add routing policy in query errmsg upon unavailable segments for a bit more context [pinot]
klsince commented on code in PR #13706:
URL: https://github.com/apache/pinot/pull/13706#discussion_r1704594337
##########
pinot-broker/src/main/java/org/apache/pinot/broker/requesthandler/BaseSingleStageBrokerRequestHandler.java:
##########
@@ -605,12 +610,22 @@ protected BrokerResponse handleRequest(long requestId, String query, @Nullable S
List<ProcessingException> exceptions = new ArrayList<>();
if (numUnavailableSegments > 0) {
String errorMessage;
+ String routingPolicy;
+ if (offlineRoutingPolicy != null && realtimeRoutingPolicy != null) {
+ routingPolicy = String.format("%s [realtime], %s [offline]", realtimeRoutingPolicy, offlineRoutingPolicy);
+ } else if (offlineRoutingPolicy != null) {
+ routingPolicy = offlineRoutingPolicy;
Review Comment:
sgtm
##########
pinot-broker/src/main/java/org/apache/pinot/broker/requesthandler/BaseSingleStageBrokerRequestHandler.java:
##########
@@ -605,12 +610,22 @@ protected BrokerResponse handleRequest(long requestId, String query, @Nullable S
List<ProcessingException> exceptions = new ArrayList<>();
if (numUnavailableSegments > 0) {
String errorMessage;
+ String routingPolicy;
+ if (offlineRoutingPolicy != null && realtimeRoutingPolicy != null) {
+ routingPolicy = String.format("%s [realtime], %s [offline]", realtimeRoutingPolicy, offlineRoutingPolicy);
+ } else if (offlineRoutingPolicy != null) {
+ routingPolicy = offlineRoutingPolicy;
+ } else {
+ routingPolicy = realtimeRoutingPolicy;
+ }
Review Comment:
ack
--
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: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org