Skip to content
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

Duplicate entry for key PRIMARY #13

Open
alexbotov opened this issue Oct 22, 2018 · 1 comment
Open

Duplicate entry for key PRIMARY #13

alexbotov opened this issue Oct 22, 2018 · 1 comment

Comments

@alexbotov
Copy link

Hello,

experiencing quite often this error from the local java client:

22-10-2018 20:15:19.842 [http-nio-9900-exec-8] ERROR o.a.c.c.C.[.[.[.[dispatcherServlet].log - Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.dao.DuplicateKeyException: PreparedStatementCallback; SQL [INSERT INTO eventuate.events (event_id, event_type, event_data, entity_type, entity_id, triggering_event, metadata) VALUES (?, ?, ?, ?, ?, ?, ?)Duplicate entry '000001669cc6176a-f6c877a3755e0000' for key 'PRIMARY'; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '000001669cc6176a-f6c877a3755e0000' for key 'PRIMARY'] with root cause com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '000001669cc6176a-f6c877a3755e0000' for key 'PRIMARY'

it happens on higher load, I took look at IdGeneratorImpl and maybe there is race condition in genIdInternal (counter = counter + 1)

any clue for the cause?

Cheers,
Alex

@ddaeyongee
Copy link

Hi. I'm Taeyong Kang working as an Application Architect at LG in South fo Korea.
I am having the same problem. I'd like to get help with a more unique key development method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants