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

X-ClickHouse-Exception-Code in HTTP Header #8786

Merged
merged 13 commits into from
Jan 26, 2020

Conversation

millb
Copy link
Contributor

@millb millb commented Jan 22, 2020

I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en

Changelog category (leave one):

  • New Feature

Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Added X-ClickHouse-Exception-Code HTTP header that is set if exception was thrown before sending data. This implements #4971.
...

Detailed description / Documentation draft:

...

By adding documentation, you'll allow users to try your new feature immediately, not when someone else will have time to document it later. Documentation is necessary for all features that affect user experience in any way. You can add brief documentation draft above, or add documentation right into your patch as Markdown files in docs folder.

If you are doing this for the first time, it's recommended to read the lightweight Contributing to ClickHouse Documentation guide first.

@alexey-milovidov alexey-milovidov changed the title [WIP] X-Click-House-Exception-Code in HTTP Header [WIP] X-ClickHouse-Exception-Code in HTTP Header Jan 22, 2020
@millb millb changed the title [WIP] X-ClickHouse-Exception-Code in HTTP Header X-ClickHouse-Exception-Code in HTTP Header Jan 24, 2020
@alexey-milovidov alexey-milovidov merged commit 97a75dd into ClickHouse:master Jan 26, 2020
@CurtizJ CurtizJ added the pr-feature Pull request with new product feature label Jan 30, 2020
@qoega qoega added the doc-alert label Apr 1, 2020
@qoega
Copy link
Member

qoega commented Apr 1, 2020

@BayoNet lets add a place in docs with all headers list and explanation? Do we have a ticket for that?

@den-crane
Copy link
Contributor

Not sure it's working. It's working sometimes.

echo 'SELECT sleep(1) from numbers(10) settings max_block_size=1' | curl -vvv 'http://localhost:8123/?max_execution_time=5&timeout_before_checking_execution_speed=2' --data-binary @-

< Keep-Alive: timeout=3
< X-ClickHouse-Summary: {"read_rows":"0","read_bytes":"0","written_rows":"0","written_bytes":"0","total_rows_to_read":"0"}
<
0
0
Code: 160, e.displayText() = DB::Exception: Estimated query execution time (6.680003333333334 seconds) is too long. Maximum: 5. Estimated rows to process: 10: While executing Numbers (version 21.7.1.6993 (official build))
* Connection #0 to host localhost left intact

@alexey-milovidov
Copy link
Member

@den-crane HTTP headers cannot be sent after data.
In your example you have the data

0
0

@alexey-milovidov alexey-milovidov self-assigned this Jun 1, 2021
@den-crane
Copy link
Contributor

Ah, OK. I see.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-feature Pull request with new product feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants