Skip to content
This repository has been archived by the owner on Dec 8, 2021. It is now read-only.

why lightning change table auto_increment?为什么lightning会修改自增值的大小? #222

Closed
sandy20140407 opened this issue Aug 6, 2019 · 0 comments · Fixed by #227
Labels
question This issue is a question

Comments

@sandy20140407
Copy link

log:
[INFO] [restore.go:1253] ["import and cleanup engine completed"] [engineTag=test.favfav:-1] [engineUUID=9c824252-d150-5902-a2c0-02d2f26ebf6c] [takeTime=8.515710692s] []
[INFO] [tidb.go:232] ["alter table auto_increment start"] [table=test.favfav] [auto_increment=1567203009]

question:
why lightning change the auto_increment value before checksum? And the new value will be so big that would lead to long gap between max(primary id) and next new rows.
lightning 在导入数据结束,checksum前会修改自增值,如果表数据很大,新的自增值和实际的当前最大ID间的距离会非常大,有字段溢出的风险。

@sandy20140407 sandy20140407 added the question This issue is a question label Aug 6, 2019
kennytm added a commit that referenced this issue Aug 18, 2019
This makes sure the final AUTO_INCREMENT value is exactly the maximum value
of the auto-inc column. Fix #222.
kennytm added a commit that referenced this issue Aug 20, 2019
This makes sure the final AUTO_INCREMENT value is exactly the maximum value
of the auto-inc column. Fix #222.
kennytm added a commit that referenced this issue Aug 30, 2019
This makes sure the final AUTO_INCREMENT value is exactly the maximum value
of the auto-inc column. Fix #222.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
question This issue is a question
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant