agavra commented on code in PR #9571:
URL: https://github.com/apache/pinot/pull/9571#discussion_r993900870


##########
pinot-broker/src/main/java/org/apache/pinot/broker/requesthandler/MultiStageBrokerRequestHandler.java:
##########
@@ -87,10 +88,18 @@ public MultiStageBrokerRequestHandler(PinotConfiguration 
config, BrokerRoutingMa
     }
     _reducerHostname = reducerHostname;
     _reducerPort = config.getProperty(QueryConfig.KEY_OF_QUERY_RUNNER_PORT, 
QueryConfig.DEFAULT_QUERY_RUNNER_PORT);
+    long brokerTimeoutMs = 
config.getProperty(CommonConstants.Broker.CONFIG_OF_BROKER_TIMEOUT_MS, -1L);
+    if (brokerTimeoutMs == -1) {
+      _timeoutNs = 
config.getProperty(QueryConfig.KEY_OF_QUERY_RUNNER_TIMEOUT_NANO,
+          QueryConfig.DEFAULT_QUERY_RUNNER_TIMEOUT_NANO);
+    } else {
+      _timeoutNs = brokerTimeoutMs * 1_000_000L;

Review Comment:
   nit: can we use `TimeUnit.MILLIS.toNanos(brokerTimeoutMs)` - makes it a bit 
easier to read.



##########
pinot-query-runtime/src/main/java/org/apache/pinot/query/service/QueryConfig.java:
##########
@@ -22,7 +22,9 @@
  * Configuration for setting up query runtime.
  */
 public class QueryConfig {
-  public static final long DEFAULT_TIMEOUT_NANO = 10_000_000_000L;
+  // query runner timeout is the default timeout for mailbox traffic.
+  public static final String KEY_OF_QUERY_RUNNER_TIMEOUT_NANO = 
"pinot.query.runner.timeout.nano";
+  public static final long DEFAULT_QUERY_RUNNER_TIMEOUT_NANO = 10_000_000_000L;

Review Comment:
   nit: `TimeUnit.Seconds.toNanos(10)`



-- 
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]

Reply via email to