-
Notifications
You must be signed in to change notification settings - Fork 411
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
fix the problem that offset in limit query for tiflash system tables doesn't take effect #6745
Conversation
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
2c6de3c
to
fa1a347
Compare
Does this bug also affect the v5.x versions or only the v6.x versions? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
In response to a cherrypick label: new pull request created to branch |
Signed-off-by: ti-chi-bot <[email protected]>
Signed-off-by: ti-chi-bot <[email protected]>
In response to a cherrypick label: new pull request created to branch |
Signed-off-by: ti-chi-bot <[email protected]>
In response to a cherrypick label: new pull request created to branch |
In response to a cherrypick label: new pull request created to branch |
Signed-off-by: ti-chi-bot <[email protected]>
In response to a cherrypick label: new pull request created to branch |
Signed-off-by: ti-chi-bot <[email protected]>
In response to a cherrypick label: new pull request created to branch |
Signed-off-by: ti-chi-bot <[email protected]>
After verification, it just affect the master branch. |
OK, I think it is introduced by this PR: #6268 |
…doesn't take effect (pingcap#6745) * respect offset in LimitBlockInputStream * remove LimitTransformAction * fix unit test Signed-off-by: ywqzzy <[email protected]>
What problem does this PR solve?
Issue Number: close #6747
Problem Summary: When query tiflash system tables from tidb, tidb will send query like
select ... limit offset, 1024
. And the query only stops when the num of return rows is less thanlength
. However, theoffset
parameter is not repected by tiflash, and will always return the same result with anyoffset
value. So if the system table has more than 1024 rows, the query will hang forever.What is changed and how it works?
Port the implementation from https://github.com/ClickHouse/ClickHouse/blob/19.5/dbms/src/DataStreams/LimitBlockInputStream.cpp#L21
Check List
Tests
dt_segments
with more than 1024 rows;select count(*) from information_schema.tiflash_segments
and make sure it succeeds;Side effects
Documentation
Release note