Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.
Original topic: auto_increment冲突的解决办法
When using auto_increment, manually inserting some data caused a conflict in the cached ID range, resulting in the failure of the auto_increment ID. How should this situation be handled? When restarting TiDB, will it re-cache the ID range by querying the current maximum ID to obtain a non-conflicting range?
ALTER TABLE auto_increment_test
AUTO_INCREMENT = 1000000;
Normally, a write conflict will only occur once. The TiDB server can automatically obtain the maximum ID of the table to update the cache, and of course, a restart can also do this.
Previously, I encountered repeated conflicts for some unknown reason. Each time the ID increased by 1, but a new range was not taken. However, there were also instances where a conflict was resolved in one go. There are three TiDB instances.
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.