shauryachats commented on code in PR #17278:
URL: https://github.com/apache/pinot/pull/17278#discussion_r2628434995
##########
pinot-query-runtime/src/main/java/org/apache/pinot/query/runtime/timeseries/TimeSeriesExchangeReceiveOperator.java:
##########
@@ -116,13 +118,27 @@ private TimeSeriesBlock getNextBlockWithAggregation()
TimeBuckets timeBuckets = null;
Map<Long, BaseTimeSeriesBuilder> seriesBuilderMap = new HashMap<>();
Map<String, String> aggregatedStats = new HashMap<>();
+ QueryException timeoutException = null;
+
for (int index = 0; index < _numServersQueried; index++) {
// Step-1: Poll, and ensure we received a TimeSeriesBlock.
long remainingTimeMs = _deadlineMs - System.currentTimeMillis();
- Preconditions.checkState(remainingTimeMs > 0,
- "Timed out before polling all servers. Successfully Polled: %s of
%s", index, _numServersQueried);
+ if (remainingTimeMs <= 0) {
Review Comment:
Good catch, fixed.
##########
pinot-query-runtime/src/main/java/org/apache/pinot/query/runtime/timeseries/TimeSeriesExchangeReceiveOperator.java:
##########
@@ -116,13 +118,27 @@ private TimeSeriesBlock getNextBlockWithAggregation()
TimeBuckets timeBuckets = null;
Map<Long, BaseTimeSeriesBuilder> seriesBuilderMap = new HashMap<>();
Map<String, String> aggregatedStats = new HashMap<>();
+ QueryException timeoutException = null;
+
for (int index = 0; index < _numServersQueried; index++) {
// Step-1: Poll, and ensure we received a TimeSeriesBlock.
long remainingTimeMs = _deadlineMs - System.currentTimeMillis();
- Preconditions.checkState(remainingTimeMs > 0,
- "Timed out before polling all servers. Successfully Polled: %s of
%s", index, _numServersQueried);
+ if (remainingTimeMs <= 0) {
+ timeoutException = new
QueryException(QueryErrorCode.SERVER_NOT_RESPONDING,
+ "Timed out before polling all servers. Successfully Polled: %s of %s"
+ + index
+ + " of "
+ + _numServersQueried);
+ break;
+ }
Object result = poll(remainingTimeMs);
- Preconditions.checkNotNull(result, "Timed out waiting for response.
Waited: %s ms", remainingTimeMs);
+ if (result == null) {
+ timeoutException = new
QueryException(QueryErrorCode.SERVER_NOT_RESPONDING,
Review Comment:
Added a TODO.
--
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]