You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by jb...@apache.org on 2016/11/17 05:55:46 UTC

[1/2] git commit: updated refs/heads/4.8 to 8c3ca15

Repository: cloudstack
Updated Branches:
  refs/heads/4.8 293ec4f3f -> 8c3ca1599


CLOUDSTACK-9460: For long running transactions, if the connection is
timed out by the mysql server then refresh it


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/a813baed
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/a813baed
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/a813baed

Branch: refs/heads/4.8
Commit: a813baed49e50c014fa22df81fc6bc8bc9095213
Parents: 9eb8b2e
Author: Abhinandan Prateek <ab...@shapeblue.com>
Authored: Wed Aug 17 16:15:15 2016 +0530
Committer: Abhinandan Prateek <ab...@shapeblue.com>
Committed: Mon Sep 19 14:08:26 2016 +0530

----------------------------------------------------------------------
 .../db/src/com/cloud/utils/db/TransactionLegacy.java    | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a813baed/framework/db/src/com/cloud/utils/db/TransactionLegacy.java
----------------------------------------------------------------------
diff --git a/framework/db/src/com/cloud/utils/db/TransactionLegacy.java b/framework/db/src/com/cloud/utils/db/TransactionLegacy.java
index af834ca..8f71e87 100644
--- a/framework/db/src/com/cloud/utils/db/TransactionLegacy.java
+++ b/framework/db/src/com/cloud/utils/db/TransactionLegacy.java
@@ -168,7 +168,7 @@ public class TransactionLegacy implements Closeable {
                 isNew = true;
             }
         }
-
+        txn.checkConnection();
         txn.takeOver(name, false);
         if (isNew) {
             s_mbean.addTransaction(txn);
@@ -176,6 +176,16 @@ public class TransactionLegacy implements Closeable {
         return txn;
     }
 
+    public void checkConnection() {
+        try {
+            if (_conn != null && !_conn.isValid(3)) {
+                _conn = null;
+            }
+        } catch (SQLException e) {
+            _conn = null;
+        }
+    }
+
     protected StackElement peekInStack(Object obj) {
         final Iterator<StackElement> it = _stack.iterator();
         while (it.hasNext()) {


[2/2] git commit: updated refs/heads/4.8 to 8c3ca15

Posted by jb...@apache.org.
Merge pull request #1674 from shapeblue/master_db_timout_4_8

CLOUDSTACK-9460: For long running transactions, if the connection istimed out by the mysql server then refresh it

* pr/1674:
  CLOUDSTACK-9460: For long running transactions, if the connection is timed out by the mysql server then refresh it

Signed-off-by: John Burwell <me...@cockamamy.net>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/8c3ca159
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/8c3ca159
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/8c3ca159

Branch: refs/heads/4.8
Commit: 8c3ca15995a9a435be2bebb7040877310b4982b8
Parents: 293ec4f a813bae
Author: John Burwell <me...@cockamamy.net>
Authored: Thu Nov 17 00:54:11 2016 -0500
Committer: John Burwell <me...@cockamamy.net>
Committed: Thu Nov 17 00:54:11 2016 -0500

----------------------------------------------------------------------
 .../db/src/com/cloud/utils/db/TransactionLegacy.java    | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)
----------------------------------------------------------------------