Do not suppress exceptions in web disk (and fix retries for requests from web disk)#42800
Merged
kssenii merged 7 commits intoClickHouse:masterfrom Nov 20, 2022
Merged
Do not suppress exceptions in web disk (and fix retries for requests from web disk)#42800kssenii merged 7 commits intoClickHouse:masterfrom
kssenii merged 7 commits intoClickHouse:masterfrom
Conversation
kssenii
reviewed
Nov 2, 2022
src/Disks/ObjectStorages/Web/MetadataStorageFromStaticFilesWebServer.cpp
Outdated
Show resolved
Hide resolved
dabb495 to
bd1b77e
Compare
kssenii
approved these changes
Nov 11, 2022
Before this patch it is possible that web disk will suppress it and
instead of got an exception during read you will get just zero records:
2022.10.28 15:18:30.739698 [ 10663 ] {} <Error> ReadWriteBufferFromHTTP: HTTP request to `http://127.0.0.1:8080/store/a3e/a3e65e1f-5fd4-47ed-9dbd-307f2586b52d/detached/.index` failed at try 1/1 with bytes read: 0/unknown. Error: Connection refused. (Current backoff wait is 100/1600 ms)
2022.10.28 15:18:30.841210 [ 10663 ] {} <Trace> DiskWeb: Cannot load disk metadata. Error: Poco::Exception. Code: 1000, e.code() = 111, Connection refused (version 22.11.1.1...
Here this exception received on initialization, from server context,
i.e. w/o query context and that's why it hadn't throw, and eventually
you will just zero records:
SELECT *
FROM data_from_web
Query id: ee544a5e-3c67-4fb4-8f14-f8e4a082b237
Ok.
0 rows in set. Elapsed: 0.019 sec.
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
Member
Author
|
Failures are unrelated.
Likely due to slow MergeTree parts removal Details
|
azat
added a commit
to azat/ClickHouse
that referenced
this pull request
Nov 22, 2022
While dropping the table server scans all disk for existence of data to remove, but in case of unavailable web disk it will fail, and also not instantly but after 10 retries (by default, after ClickHouse#42800), that can take ~30 seconds. But scanning read only disks does not makes any sense, so reorder conditions to avoid this. Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Do not suppress exceptions in web disk. Fix retries for web disk.
Before this patch it is possible that web disk will suppress it and instead of got an exception during read you will get just zero records:
Here this exception received on initialization, from server context, i.e. w/o query context and that's why it hadn't throw, and eventually you will just zero records:
Cc: @kssenii
Cc: @alexey-milovidov