Concurrency aggregate modification exception and SQL integrity exception

49 views
Skip to first unread message

Vijaya Kotwani

unread,
Jun 29, 2015, 12:28:39 PM6/29/15
to axonfr...@googlegroups.com
Hi Allard,
In our case we extend from AbstractAnnotatedAggregateRoot with proper routing strategy. But this is observed in our case that when we have two instances of application is running, we often we get Concurrency Modification exception. JGroups using AnnotationRoutingStrategy is used for load distribution.

Also sometimes it is observed that request takes little longer time to reach to proper node for processing .

Can you please suggest how to fix this issue?

Thanks,
Vijaya

Vijaya Kotwani

unread,
Jun 30, 2015, 9:27:17 AM6/30/15
to axonfr...@googlegroups.com
Do you have any suggestions on this. 
During processing we see request processing is done by proper application node/ instance based on routing key. Still we this concurrency modification exception.
Does this exception has any major impact on the application/ db processing.

Allard Buijze

unread,
Jun 30, 2015, 2:11:36 PM6/30/15
to axonfr...@googlegroups.com
Hi Vijaya,

did you check the isolation level of your JDBC connection? Many databases default to "repeatable read", which can cause this, even with the proper locks in place. The problem is that the lock is obtained with an active connection. When the lock is free, the connection was already started and may not see the changes made in the meantime.

The best setting, in my experience, is READ_COMMITTED.

Cheers,

Allard

--
You received this message because you are subscribed to the Google Groups "Axon Framework Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to axonframewor...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages