cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wid...@apache.org
Subject [07/50] [abbrv] git commit: updated refs/heads/statscollector-graphite to 621156c
Date Sun, 28 Sep 2014 09:40:07 GMT
throw timeout exception when lock acquire times out


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

Branch: refs/heads/statscollector-graphite
Commit: d8ad3e32bc6ee41d576fa99473834485a5266f93
Parents: b3c117a
Author: Anthony Xu <anthony.xu@citrix.com>
Authored: Tue Sep 23 17:35:47 2014 -0700
Committer: Anthony Xu <anthony.xu@citrix.com>
Committed: Tue Sep 23 18:01:32 2014 -0700

----------------------------------------------------------------------
 framework/db/src/com/cloud/utils/db/Merovingian2.java | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d8ad3e32/framework/db/src/com/cloud/utils/db/Merovingian2.java
----------------------------------------------------------------------
diff --git a/framework/db/src/com/cloud/utils/db/Merovingian2.java b/framework/db/src/com/cloud/utils/db/Merovingian2.java
index f6df493..a930dff 100644
--- a/framework/db/src/com/cloud/utils/db/Merovingian2.java
+++ b/framework/db/src/com/cloud/utils/db/Merovingian2.java
@@ -138,10 +138,9 @@ public class Merovingian2 extends StandardMBean implements MerovingianMBean
{
             } catch (InterruptedException e) {
             }
         }
-        if (s_logger.isTraceEnabled()) {
-            s_logger.trace("Timed out on acquiring lock " + key + ".  Waited for " + (InaccurateClock.getTime()
- startTime));
-        }
-        return false;
+        String msg = "Timed out on acquiring lock " + key + " .  Waited for " + ((InaccurateClock.getTime()
- startTime)/1000) +  "seconds";
+        s_logger.warn(msg);
+        throw new CloudRuntimeException(msg);
     }
 
     protected boolean increment(String key, String threadName, int threadId) {


Mime
View raw message