Skip to content
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

parser: add autoid cache option #765

Merged
merged 14 commits into from
Apr 10, 2020
Merged

parser: add autoid cache option #765

merged 14 commits into from
Apr 10, 2020

Conversation

AilinKid
Copy link
Contributor

@AilinKid AilinKid commented Mar 11, 2020

What problem does this PR solve?

By now, the auto-increment cache in TiDB is quite big for inserting performance.

In some cases, some table is used as a tool to generate some id, the autoid cache will miss when tidb crash or restart, which leading autoid increment quickly.

The related to pingcap/tidb#15409

That's why we support the auto-increment cache option.

What is changed and how it works?

Add auto_increment_cache table option.
Make some test about it.

Check List

Tests

  • Unit test
  • Integration test

Related changes

  • Need to update the documentation

@AilinKid AilinKid requested a review from a team March 11, 2020 09:46
@ghost ghost requested review from tangenta and removed request for a team March 11, 2020 09:46
@codecov
Copy link

codecov bot commented Mar 11, 2020

Codecov Report

Merging #765 into master will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #765   +/-   ##
=======================================
  Coverage   78.21%   78.22%           
=======================================
  Files          40       40           
  Lines       14694    14700    +6     
=======================================
+ Hits        11493    11499    +6     
  Misses       2520     2520           
  Partials      681      681           

Copy link
Contributor

@kennytm kennytm left a comment

Choose a reason for hiding this comment

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

LGTM

@kennytm kennytm added the status/LGT1 LGT1 label Mar 12, 2020
@tiancaiamao
Copy link
Collaborator

Is there a TiDB PR for this change?

@AilinKid
Copy link
Contributor Author

Is there a TiDB PR for this change?

Yes,it's still work in process.

@tiancaiamao
Copy link
Collaborator

Is there a TiDB PR for this change?

Yes,it's still work in process.

After it's done, please link that PR with this one, so we can merge them together. @AilinKid

Copy link
Contributor

@tangenta tangenta left a comment

Choose a reason for hiding this comment

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

LGTM

parser.y Outdated
@@ -4884,6 +4885,7 @@ UnReservedKeyword:
| "ADVISE"
| "ASCII"
| "AUTO_INCREMENT"
| "AUTO_INCREMENT_CACHE"
Copy link
Member

Choose a reason for hiding this comment

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

Please rename it to AUTO_ID_CACHE, as you mentioned, it doesn't affect AutoIncrement column only.

@bb7133
Copy link
Member

bb7133 commented Mar 17, 2020

Please address the comment and fix CI.

@bb7133
Copy link
Member

bb7133 commented Mar 17, 2020

LGTM, but let's hold it DNM until the TiDB PR is ready to merge.

@AilinKid AilinKid removed the DNM label Apr 10, 2020
@bb7133 bb7133 merged commit 81f3db8 into pingcap:master Apr 10, 2020
@sre-bot
Copy link

sre-bot commented Apr 10, 2020

cherry pick to release-2.1 failed

@sre-bot
Copy link

sre-bot commented Apr 10, 2020

cherry pick to release-3.0 failed

@sre-bot
Copy link

sre-bot commented Apr 10, 2020

cherry pick to release-3.1 failed

AilinKid added a commit to AilinKid/parser that referenced this pull request Apr 11, 2020
AilinKid added a commit to AilinKid/parser that referenced this pull request Apr 11, 2020
AilinKid added a commit to AilinKid/parser that referenced this pull request Apr 11, 2020
AilinKid added a commit to AilinKid/parser that referenced this pull request Apr 20, 2020
AilinKid added a commit that referenced this pull request Apr 22, 2020
AilinKid added a commit to AilinKid/parser that referenced this pull request Apr 27, 2020
AilinKid added a commit that referenced this pull request Apr 27, 2020
tiancaiamao pushed a commit to tiancaiamao/parser that referenced this pull request Apr 27, 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.

6 participants