Fix threadpool read for remote disks#31112
Merged
kssenii merged 3 commits intoClickHouse:masterfrom Nov 8, 2021
Merged
Conversation
alesapin
approved these changes
Nov 8, 2021
| auto [right_offset, mark_range_bytes] = getRightOffsetAndBytesRange(range.begin, range.end); | ||
| if (!right_offset) | ||
| { | ||
| if (last_right_offset && !last_right_offset.value()) |
Member
There was a problem hiding this comment.
Extremely confusing. list_right_offset && list_right_offset == 0 right?
Member
There was a problem hiding this comment.
Do we really need it? What happen if we just remove this if?
Member
Author
There was a problem hiding this comment.
Yes, we need it. Otherwise this will happen:
DB::Exception: Received from localhost:9000. DB::Exception: Prefetch is valid in readUntilEnd
Extremely confusing. list_right_offset && list_right_offset == 0 right?
Yes.
|
|
||
| void setReadUntilPosition(size_t position) override { impl->setReadUntilPosition(position); } | ||
|
|
||
| void setReadUntilEnd() override { impl->setReadUntilEnd(); } |
Member
Author
There was a problem hiding this comment.
No, 50/50 with other code. There were two different exceptions.
| if (last_right_offset && !last_right_offset.value()) | ||
| return; | ||
|
|
||
| last_right_offset = 0; // Zero value means the end of file. |
Member
Author
There was a problem hiding this comment.
Same reason as I wrote on your first comment.
alesapin
approved these changes
Nov 8, 2021
Member
Author
|
Integration tests failures not related to changes. |
This was referenced Nov 10, 2021
robot-clickhouse
pushed a commit
that referenced
this pull request
Nov 10, 2021
kssenii
added a commit
that referenced
this pull request
Nov 11, 2021
Backport #31112 to 21.11: Fix threadpool read for remote disks
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):