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
make read quota limiter work for coprocessor as well #13257
Conversation
Signed-off-by: qi.xu <tonxuqi@outlook.com>
[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. |
/cc BornChanger |
@tonyxuqqi: GitHub didn't allow me to request PR reviews from the following users: BornChanger. Note that only tikv members and repo collaborators can review this PR, and authors cannot review their own PRs. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@@ -471,6 +471,9 @@ impl<SS: 'static> BatchExecutorsRunner<SS> { | |||
&mut ctx, | |||
)? | |||
}; | |||
if chunk.has_rows_data() { |
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.
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.
note here the limiter is foreground limiter---that is to limit actual response size back to TiDB, not the IO limiter.
@@ -76,6 +77,7 @@ fn test_select() { | |||
let result_encoded = datum::encode_value(&mut EvalContext::default(), &row).unwrap(); | |||
assert_eq!(result_encoded, &*expected_encoded); | |||
} | |||
assert!(limiter.total_read_bytes_consumed(true) > 0); // the consume_sample is called due to read bytes quota |
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.
why not give a solid number?
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.
OK, looks that it's doable.
Signed-off-by: qi.xu <tonxuqi@outlook.com>
@BornChanger: Thanks for your review. The bot only counts approvals from reviewers and higher roles in list, but you're still welcome to leave your comments. In response to this: Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. |
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
/test |
/merge |
@5kbpers: It seems you want to merge this PR, I will help you trigger all the tests: /run-all-tests You only need to trigger If you have any questions about the PR merge process, please refer to pr process. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. |
This pull request has been accepted and is ready to merge. Commit hash: 848ec5d
|
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
cherry pick to release-6.0 in PR #13323 |
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
cherry pick to release-6.1 in PR #13324 |
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
cherry pick to release-6.2 in PR #13325 |
ref tikv#13257, close tikv#13301 Signed-off-by: BornChanger <dawn_catcher@126.com> Co-authored-by: Ti Chi Robot <ti-community-prow-bot@tidb.io> Signed-off-by: TonsnakeLin <lpbgytong@163.com>
close tikv#13256 The coprocessor's read bytes are not calculated by foreground quota limiter. Signed-off-by: qi.xu <tonxuqi@outlook.com> Co-authored-by: qi.xu <tonxuqi@outlook.com> Co-authored-by: 5kbpers <hustmh@gmail.com> Signed-off-by: fengou1 <feng.ou@pingcap.com>
ref tikv#13257, close tikv#13301 Signed-off-by: BornChanger <dawn_catcher@126.com> Co-authored-by: Ti Chi Robot <ti-community-prow-bot@tidb.io> Signed-off-by: fengou1 <feng.ou@pingcap.com>
Signed-off-by: qi.xu tonxuqi@outlook.com
What is changed and how it works?
Issue Number: Close #13256
What's Changed:
Related changes
pingcap/docs
/pingcap/docs-cn
:Check List
Tests
Side effects
Release note