cloudstack-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Commented] (CLOUDSTACK-9595) Transactions are not getting retried in case of database deadlock errors
Date Fri, 25 Nov 2016 11:30:58 GMT


ASF GitHub Bot commented on CLOUDSTACK-9595:

Github user rafaelweingartner commented on the issue:
    @serg38 if that "AssignIpAddressFromPodVlanSearch" object was being used to generate the
SQL; should not we see a join with "pod_vlan_map" too? For me this, this SC is very confusing.
    Following the same idea of what I would do if using Spring to manage transactions, the
method "fetchNewPublicIp" does not need the "@DB" annotation (assuming this is the annotation
that opens a transaction and locks tables in ACS). The method “fetchNewPublicIp” is a
simple "retrieve/get" method. Whenever we have to lock the table that is being used by this
method, we could use the "fetchNewPublicIp" in a method that has the "@DB" annotation (assuming
it has transaction propagation). This is something that already seems to happen. Methods "allocateIp"
and "assignDedicateIpAddress" use “fetchNewPublicIp” and they have their own “@DB”
    Methods “assignPublicIpAddressFromVlans” and “assignPublicIpAddress” seem not
to do anything that requires a transaction; despite misleading (at least for me) with names
indicating that something will be assigned to someone, they just call and return the response
of  “fetchNewPublicIp” method. Therefore, I do not think they require a locking transaction.

> Transactions are not getting retried in case of database deadlock errors
> ------------------------------------------------------------------------
>                 Key: CLOUDSTACK-9595
>                 URL:
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the default.) 
>    Affects Versions: 4.8.0
>            Reporter: subhash yedugundla
>             Fix For: 4.8.1
> Customer is seeing occasional error 'Deadlock found when trying to get lock; try restarting
transaction' messages in their management server logs.  It happens regularly at least once
a day.  The following is the error seen 
> 2015-12-09 19:23:19,450 ERROR [cloud.api.ApiServer] (catalina-exec-3:ctx-f05c58fc ctx-39c17156
ctx-7becdf6e) unhandled exception executing api command: [Ljava.lang.String;@230a6e7f
> DB Exception on: com.mysql.jdbc.JDBC4PreparedStatement@74f134e3:
DELETE FROM instance_group_vm_map WHERE instance_group_vm_map.instance_id = 941374
> 	at
> 	at sun.reflect.GeneratedMethodAccessor360.invoke(Unknown Source)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> 	at java.lang.reflect.Method.invoke(
> 	at
> 	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(
> 	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
> 	at
> 	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
> 	at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(
> 	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
> 	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(
> 	at com.sun.proxy.$Proxy237.expunge(Unknown Source)
> 	at$2.doInTransactionWithoutResult(
> 	at
> 	at$2.doInTransaction(
> 	at
> 	at
> 	at
> 	at

This message was sent by Atlassian JIRA

View raw message