-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
*: refactor table.Table interface, clean up unnecessay methods #22430
Conversation
|
The remained methods for Table now is:
|
Maybe it is worth to remove |
Now |
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.
Rest LGTM
/lgtm |
Co-authored-by: tangenta <[email protected]>
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
/lgtm |
[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 writing |
/merge |
@tiancaiamao: 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: 5781f11
|
@tiancaiamao: Your PR was out of date, I have automatically updated it for you. At the same time I will also trigger all tests for you: /run-all-tests 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. |
What problem does this PR solve?
There are so many methods in the
Table
interface definition, make it less flexible.What is changed and how it works?
Clean up unnecessary methods from the
table.Table
interface.What's Changed:
This one is only used in one place and is in the test code, so remove it.
This one is not really used.
This can be replaced by
tablecodec.EncodeRecordKey(RecordPrefix(), h)
provide thatRecordPrefix()
is given.This one is a simple wrap on
RecordKey()
, it's not necessary to be an interface method.Those are implementation-related, the interface should be abstract.
We may have
temporary table
,memory table
,partition table
, and many more, not all of them have the concept ofRecordPrefix
We already provide
Allocator()
method in theTable
interface, this one is just a simple wrap onAllocator()
, so it's duplicated.How it Works:
Remove
RecordPrefix
andIndexPrefix
involves a lot of changes, maybe I should do it in another PR.Related changes
pingcap/docs
/pingcap/docs-cn
:Check List
Tests
Side effects
API change
Release note
table.Table
interface