ege-st commented on code in PR #13706:
URL: https://github.com/apache/pinot/pull/13706#discussion_r1696122861
##########
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:
Why not format this to have the `[offline]` tag like line 615? It will help
make sure people know that it's an offline/realtime policy and it keeps
consistency for the logging.
##########
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:
It would be cleaner to pull this out into a small helper function.
--
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]