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
raftstore: Implement coprocessor observer post_exec_admin(query) #12850
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. |
/run-all-tests |
@@ -1323,6 +1346,10 @@ where | |||
} | |||
} | |||
|
|||
if should_write { | |||
info!("persist data and apply state"; "region_id" => self.region_id(), "peer_id" => self.id(), "state" => ?self.apply_state); | |||
ctx.commit(self); |
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.
Should we move this into an outer function?
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.
Yes, otherwise the response won't be returned for the last command.
/cc @BusyJay @tonyxuqqi |
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.
Add some test for changes in apply.rs
Will do that after pre_exec_query(admin) are merged in test_exec_observer. |
Signed-off-by: CalvinNeo <calvinneo1995@gmail.com>
Signed-off-by: CalvinNeo <calvinneo1995@gmail.com>
Signed-off-by: CalvinNeo <calvinneo1995@gmail.com>
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.
I think we need to bench the performance impact after adding two observers. sysbench should be enough.
@@ -1323,6 +1346,10 @@ where | |||
} | |||
} | |||
|
|||
if should_write { | |||
info!("persist data and apply state"; "region_id" => self.region_id(), "peer_id" => self.id(), "state" => ?self.apply_state); | |||
ctx.commit(self); |
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.
Yes, otherwise the response won't be returned for the last command.
/build |
/run-build-arm64 comment=true |
/merge |
@breezewish: 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: d8a6323
|
…v#12850) ref tikv#12849 Support new observers post_exec_admin(query). Signed-off-by: CalvinNeo <calvinneo1995@gmail.com> Co-authored-by: Ti Chi Robot <ti-community-prow-bot@tidb.io>
download tikv binary(linux arm64) at http://fileserver.pingcap.net/download/builds/pingcap/test/tikv/d8a63233dbe11e4c2d9a92366c1bf5fe90a6fa7a/centos7/tikv-linux-arm64.tar.gz |
What is changed and how it works?
Issue Number: ref #12849
What's Changed:
According to #12849, we need to support some new observers, including post_exec_admin(query) which is implemented in this PR.
Related changes
pingcap/docs
/pingcap/docs-cn
:Check List
Tests
Side effects
Release note