Skip to content

separate auto_increment ID from row ID#1354

Closed
tangenta wants to merge 6 commits into
pingcap:masterfrom
tangenta:new-tblver
Closed

separate auto_increment ID from row ID#1354
tangenta wants to merge 6 commits into
pingcap:masterfrom
tangenta:new-tblver

Conversation

@tangenta
Copy link
Copy Markdown
Contributor

What problem does this PR solve?

The parser part of pingcap/tidb#28448.

What is changed and how it works?

  • Support syntax alter table t modify [force] row_id = xxx. This is useful in the last stage when importing with Lightning.
  • Add a job action ActionRebaseRowID.
  • Change TableInfoVersion4 to TableInfoVersion5. TableInfoVersion4 is a version that is equivalent to TableInfoVersion3 for some reasons.

Check List

Tests

  • Unit test
  • Integration test

Code changes

NA

Side effects

NA

Related changes

NA

@ti-chi-bot
Copy link
Copy Markdown
Member

[REVIEW NOTIFICATION]

This pull request has not been approved.

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Details

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

Comment thread model/model.go
// the tables with version < TableInfoVersion5 still use a single allocator for auto_increment and _tidb_rowid.
// Also see https://github.com/pingcap/tidb/issues/982.
TableInfoVersion4 = uint16(4)
TableInfoVersion5 = uint16(5)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?? what happened to version 4

Copy link
Copy Markdown
Contributor Author

@tangenta tangenta Sep 29, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Version 4 is introduced in #1170... but the TiDB part is not merged.

It is released to v5.0, so we need another version to identify that the auto IDs are separated.

@tangenta tangenta changed the title support separating auto_increment ID from row ID separate auto_increment ID from row ID Sep 29, 2021
@ti-chi-bot
Copy link
Copy Markdown
Member

@tangenta: PR needs rebase.

Details

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.

@tangenta
Copy link
Copy Markdown
Contributor Author

tangenta commented Oct 9, 2021

Since the parser is moved to TiDB repo, I am going to close this PR.

@tangenta tangenta closed this Oct 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants