-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Map BadQueryRequestException to QueryException.QUERY_VALIDATION_ERROR #14917
base: master
Are you sure you want to change the base?
Changes from all commits
aa2f562
0114c7a
89de614
1d8ac33
d1257f2
781733d
bf47aac
ec7cec1
e0e1b09
713c197
d51a37e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,6 +31,7 @@ | |
import org.apache.pinot.core.operator.combine.merger.ResultsBlockMerger; | ||
import org.apache.pinot.core.query.request.context.QueryContext; | ||
import org.apache.pinot.core.query.scheduler.resources.ResourceManager; | ||
import org.apache.pinot.spi.exception.BadQueryRequestException; | ||
import org.apache.pinot.spi.exception.EarlyTerminationException; | ||
import org.slf4j.Logger; | ||
import org.slf4j.LoggerFactory; | ||
|
@@ -111,7 +112,11 @@ protected void processSegments() { | |
@Override | ||
protected void onProcessSegmentsException(Throwable t) { | ||
_processingException.compareAndSet(null, t); | ||
_blockingQueue.offer(new ExceptionResultsBlock(t)); | ||
if (t instanceof BadQueryRequestException) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In ServerQueryExecutorV1Impl, we are setting Either way I see this change only being made in BaseSingleBlockCombineOperator. What about GroupByCombineOperator and BaseStreamingCombineOperator? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
It does. Without this change, generic There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Yeah just noticed these implement the same interface. Will update them as well There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. All patched. |
||
_blockingQueue.offer(new ExceptionResultsBlock(QueryException.QUERY_VALIDATION_ERROR, t)); | ||
} else { | ||
_blockingQueue.offer(new ExceptionResultsBlock(t)); | ||
} | ||
} | ||
|
||
@Override | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should update broker metrics - BrokerMeter.QUERY_VALIDATION_EXCEPTIONS ?
We should also update this in SingleStageBrokerRequestHandler?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For
SingleStageBrokerRequestHandler
, this is not needed becauseBadQueryRequestException
thrown byServerQueryExecutorV1Impl
is stored in BrokerResponseNative object. It's directly parsed in PinotClientRequest::getPinotQueryResponse.For this
MultiStageBrokerRequestHandler
, this was needed because query was handled by_queryDispatcher.submitAndReduce
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Diagrams for these two failure scenarios. Many middle steps are omitted and only relevant steps are shown 👇🏼
MultiStage query
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Metric incremented now. Resolved