Skip to content
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

DruidJerseyClient cannot handle Query Timeout #187

Open
mounikanakkala opened this issue Jan 19, 2024 · 0 comments
Open

DruidJerseyClient cannot handle Query Timeout #187

mounikanakkala opened this issue Jan 19, 2024 · 0 comments

Comments

@mounikanakkala
Copy link

Hello,

We are using Druidry in our system and we are facing trouble as we cannot get QueryTimeoutException.

For testing,
We sent a POST request to <druidurl>/druid/v2 with body containing groupby query with a timeout. When the query does timeout, we get a 504 Gateway Timeout error response from Druid which looks like the following

{"error":"Query timeout","errorMessage":"url[<druidurl>/druid/v2/] timed out","errorClass":"org.apache.druid.query.QueryTimeoutException","host":"<druidurl>"}

On Druid UI, for the same query with timeout, the response looks like the following

Error: Query timeout
Sequence iterator timed out waiting for data
org.apache.druid.query.QueryTimeoutException

However, when we are passing that query to zapr/druidry DruidJerseyClient, it handles only 500 error as shown here. As a result, it doesn't catch the 504 error and considers it as a successful scenario and goes to reading the response here. This leads to the library giving a confusing error that readEntity could not parse the message from Druid.

We want to be able to handle Query timeout gracefully as query timeout is a feature provided by Druid. Also, we want to be able to differentiate between Druid query failure vs timeout as they are two different things.

Can we please add QueryTimeoutException as well?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant