-
Notifications
You must be signed in to change notification settings - Fork 656
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
Update EBNF for admin statements and add checksum details #17617
base: master
Are you sure you want to change the base?
Conversation
With the example from the checksum docs:
So this is v8.0.0 with TiKV (not unistore). This is on Linux with a TiUP Playground.
The above is what the docs have in the example, but with a different checksum.
So if we remove all rows then the checksum is 0 as it isn't checksumming any rows. Then if we add the rows back then the checksum is the same again.
But if we truncate the table instead of deleting the data and then add the rows back then the checksum is different. So the checksum seems to depend on the prefix with the table_id. Note that the table has one column, which is an int, which is 4 bytes, but here each row shows 25 bytes. |
Btw. Looks like this is where the checksum is calculated: |
I think TiDB Lightning executes this command when using a |
With Unistore it behaves like this:
So the values it reports are static. Should we put a note in the docs about this? |
@dveeden I believe the Ref: Lightning calculates the Checksum in the same way, so that Lightning could know the integrity of the imported data. Considering that this SQL is only used by TiDB Lightning and doesn't seem to provide any user benefits when it is used standalone (Table ID is counted in the Checksum so that it is actually a Physical / Internal Data Checksum), I think we may even consider hiding this document? Then user could find something more useful, with less noise. |
@breezewish Some customer chooses to skip the |
@kennytm: adding LGTM is restricted to approvers and reviewers in OWNERS files. 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. |
Co-authored-by: kennytm <kennytm@gmail.com>
Thanks @kennytm @breezewish
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What is changed, added or deleted? (Required)
Some pages about specific admin statements also had EBNF for other admin statements.
Added some info to the page about
ADMIN CHECKSUM TABLE
about what checksum can be expected the same.Closes #15468
AdminStmt
EBNF to be more readable.Which TiDB version(s) do your changes apply to? (Required)
Tips for choosing the affected version(s):
By default, CHOOSE MASTER ONLY so your changes will be applied to the next TiDB major or minor releases. If your PR involves a product feature behavior change or a compatibility change, CHOOSE THE AFFECTED RELEASE BRANCH(ES) AND MASTER.
For details, see tips for choosing the affected versions.
What is the related PR or file link(s)?
Do your changes match any of the following descriptions?