DaanHoogland commented on code in PR #13925:
URL: https://github.com/apache/cloudstack/pull/13925#discussion_r3823630206


##########
framework/db/src/main/java/com/cloud/utils/db/GenericDaoBase.java:
##########
@@ -1681,6 +1683,10 @@ public T persist(final T entity) {
             throw new CloudRuntimeException("Problem with getting the ec 
attribute ", e);
         } catch (IllegalAccessException e) {
             throw new CloudRuntimeException("Problem with getting the ec 
attribute ", e);
+        } finally {
+            if (!committed) {
+                txn.rollback();

Review Comment:
   would it be possible to just rollback in the exception handlers instead?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to