Github user jburwell commented on the issue:

    https://github.com/apache/cloudstack/pull/1762
  
    @serg38 that is not a safe assumption.  Transactions often span multiple 
statements and methods across DAOs.  `TransactionLegacy` has a transaction 
stacking/nested model that further occludes when a transaction actually 
completely.
    
    Deadlocks are a severe problem that need to be fixed.  Unfortunately, this 
patch would do more harm than good as it would eventually corrupt the database. 
  In, and of themselves, retries are also a very expensive solution to the 
problem both in terms of the engineering effort required to do it properly and 
the extra stress placed on the database to perform additional work that will 
likely fail.  Furthermore, a generic **and** correct retry mechanism is a very 
difficult thing to write.  Given the way transaction boundaries are managed in 
ACS, I think such an effort would be nearly impossible.
    
    In a properly written application, deadlocks should very rarely, if ever, 
occur.  Their presence is a symptom of improper transaction handling and/or 
poor lock management problems.   Therefore, my suggestion is that we change 
this patch to log details about the context in which deadlocks occur.  We can 
then use this information to identify the areas in ACS where these contention 
problems are location and fix the root cause.


---
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.
---

Reply via email to