jihoonson commented on a change in pull request #10746: URL: https://github.com/apache/druid/pull/10746#discussion_r556270879
########## File path: processing/src/main/java/org/apache/druid/query/ResourceLimitExceededException.java ########## @@ -19,18 +19,33 @@ package org.apache.druid.query; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; import org.apache.druid.java.util.common.StringUtils; /** * Exception indicating that an operation failed because it exceeded some configured resource limit. * - * This is used as a marker exception by {@link QueryInterruptedException} to report the "Resource limit exceeded" - * error code. + * This is a {@link BadQueryException} because it will likely a user's misbehavior when this exception is thrown. + * Druid cluster operators set some set of resource limitations for some good reason. When a user query requires + * too many resources, it will likely mean that the user query should be modified to not use excessive resources. Review comment: @a2l007 oh, you are correct about the exception type in `checkTotalBytesLimit()`. My point was that this exception doesn't seem to be propagated to `JsonParserIterator` anyway because [`NettyHttpClient` doesn't do it](https://github.com/apache/druid/blob/master/core/src/main/java/org/apache/druid/java/util/http/client/NettyHttpClient.java#L263). I think `NettyHttpClient` should call `retVal.setException()` instead of `retVal.set(null)`, but I haven't studied the code enough around it to figure out why we are doing this. Anyway, it doesn't look harm to change the exception type in this PR, so I changed :slightly_smiling_face: @jon-wei :+1: Updated the javadoc. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org For additional commands, e-mail: commits-h...@druid.apache.org