-
Notifications
You must be signed in to change notification settings - Fork 489
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
Conversation
Codecov Report
@@ 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 |
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
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 |
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
parser.y
Outdated
@@ -4884,6 +4885,7 @@ UnReservedKeyword: | |||
| "ADVISE" | |||
| "ASCII" | |||
| "AUTO_INCREMENT" | |||
| "AUTO_INCREMENT_CACHE" |
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.
Please rename it to AUTO_ID_CACHE
, as you mentioned, it doesn't affect AutoIncrement column only.
Please address the comment and fix CI. |
LGTM, but let's hold it DNM until the TiDB PR is ready to merge. |
cherry pick to release-2.1 failed |
cherry pick to release-3.0 failed |
cherry pick to release-3.1 failed |
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
Related changes