Amazon Aurora MYSQL AUTO_INCREMENT sometimes gets out of sync on read and write replicas.

0

I have +20 RDS Aurora MYSQL clusters, each with a read and write replica. On each of these clusters I have many databases (thousands), and on each database I have a of table like this:

CREATE TABLE `projects` (
	`id` INT(11) NOT NULL AUTO_INCREMENT,...

Sometimes, the AUTO_INCREMENT value of this table gets out of sync on the read and write replica.

An example:

autoincrement issue

and another example:

autoincrement issue

When this happens, on insert, I get errors like this

Caused by: PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '214' for key 'PRIMARY'

Caused by: PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '16' for key 'PRIMARY'

The only fix available is a cluster failover, that is switch read and writer replicas. After failover the values are synchronized and the insert works.

Does anyone else have this issue? Is this the right place to post this issue so that the AWS developers know about and maybe fix it?

답변 없음

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인