-
-
Notifications
You must be signed in to change notification settings - Fork 596
Closed
Labels
bugSomething isn't workingSomething isn't workingcustomer issuereplicationsql serverIssues related to the built in SQL serverIssues related to the built in SQL server
Description
When performing a failover in a Dolt high-availability setup using dolt_assume_cluster_role('primary', ...), the AUTO_INCREMENT counter on the new primary is not updated to reflect the current max primary key value in the table.
What happens
1. The old primary has inserted rows with AUTO_INCREMENT primary keys (e.g., IDs up to 100).
2. These rows are replicated to the standby node as expected.
3. After failover, the new primary starts generating IDs from its previous AUTO_INCREMENT value (e.g., 50), which causes:。
ERROR 1062 (23000): Duplicate entry '101' for key 'PRIMARY'
Expected behavior
After failover, the new primary should automatically adjust the AUTO_INCREMENT counter for each table so that:
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingcustomer issuereplicationsql serverIssues related to the built in SQL serverIssues related to the built in SQL server