Github user jburwell commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/768#discussion_r46777893
  
    --- Diff: framework/db/src/com/cloud/utils/db/Transaction.java ---
    @@ -35,18 +35,15 @@
             if (currentTxn != null) {
                 databaseId = currentTxn.getDatabaseId();
             }
    -        TransactionLegacy txn = TransactionLegacy.open(name, databaseId, 
false);
    -        try {
    -//            if (txn.dbTxnStarted()){
    -//                String warnMsg = "Potential Wrong Usage: 
TRANSACTION.EXECUTE IS WRAPPED INSIDE ANOTHER DB TRANSACTION!";
    -//                s_logger.warn(warnMsg, new 
CloudRuntimeException(warnMsg));
    -//            }
    +        try (final TransactionLegacy txn = TransactionLegacy.open(name, 
databaseId, false)) {
    +            // if (txn.dbTxnStarted()){
    +            // String warnMsg = "Potential Wrong Usage: 
TRANSACTION.EXECUTE IS WRAPPED INSIDE ANOTHER DB TRANSACTION!";
    +            // s_logger.warn(warnMsg, new CloudRuntimeException(warnMsg));
    +            // }
    --- End diff --
    
    Please remove crufty commented code.  git history/bisect is a far better 
tool to understand the evolution of code.


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