Skip to content

Deadlock occurs when competing with Jdbc Repository Update. [DATAJDBC-488] #714

@spring-projects-issues

Description

@spring-projects-issues

MyeongHyeonLee opened DATAJDBC-488 and commented

Deadlock occurs when UPDATE races with the same ID of an AggregateRoot with an association.

When UPDATE is executed, the WritingContext executes in the following order.

  1. deleteReferenced
  2. updateRoot
  3. insertReferenced

If many requests occur at the same time, a deadlock occurs between the Root and Referenced tables.

Deadlock occurs in the test case below.

https://github.com/spring-projects/spring-data-jdbc/pull/191/files#diff-96c4ebdaa99aec19171b092995e4e765R70


Affects: 2.0 M3 (Neumann)

Reference URL: https://github.com/spring-projects/spring-data-jdbc/pull/191/files#diff-96c4ebdaa99aec19171b092995e4e765R70

Referenced from: pull request #191

Backported to: 1.1.5 (Moore SR5)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions