Github user rafaelweingartner commented on the issue: https://github.com/apache/cloudstack/pull/1762 Thanks, @serg38. Looking at the SQLs you posted. We could start to discuss whether or not some SQLs statements need locking transactions. Ignoring Deadlocks 3 and 4 for now, I think we could start with the ones the look the simplest (Deadlocks 1 and 2). These SQLS have probably being generated, so tracking them on ACS may not be that easy, but at first glance, I feel that we could execute them without needing lock in the database. I tried to find the first SQL, without success. Would you mind helping me pin point where in the code the SQL from transaction 1 at deadlock 1 is generated? Then, we can evaluate if it is or not needed a lock there. Are the SQLs you showed complete? I found a place that could generate SQLs similar to the one at transaction 1 and deadlock 1, but this code adds one extra where clause. The method I am talking about is: com.cloud.cluster.agentlb.ClusterBasedAgentLoadBalancerPlanner.getHostsToRebalance(long, int)
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---