mirror of
https://github.com/apache/cloudstack.git
synced 2025-12-16 18:43:26 +01:00
add logs for lock acquire and release
This commit is contained in:
parent
476733cb92
commit
c74dada854
@ -139,8 +139,9 @@ public class Merovingian2 extends StandardMBean implements MerovingianMBean {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
String msg = "Timed out on acquiring lock " + key + " . Waited for " + ((InaccurateClock.getTime() - startTime)/1000) + "seconds";
|
String msg = "Timed out on acquiring lock " + key + " . Waited for " + ((InaccurateClock.getTime() - startTime)/1000) + "seconds";
|
||||||
s_logger.warn(msg);
|
Exception e = new CloudRuntimeException(msg);
|
||||||
throw new CloudRuntimeException(msg);
|
s_logger.warn(msg, e);
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected boolean increment(String key, String threadName, int threadId) {
|
protected boolean increment(String key, String threadName, int threadId) {
|
||||||
@ -269,7 +270,9 @@ public class Merovingian2 extends StandardMBean implements MerovingianMBean {
|
|||||||
throw new CloudRuntimeException("release:Exception:"+ e.getMessage(), e);
|
throw new CloudRuntimeException("release:Exception:"+ e.getMessage(), e);
|
||||||
}
|
}
|
||||||
} else if (rows < 1) {
|
} else if (rows < 1) {
|
||||||
s_logger.warn("Was unable to find lock for the key " + key + " and thread id " + threadId);
|
String msg = ("Was unable to find lock for the key " + key + " and thread id " + threadId);
|
||||||
|
Exception e = new CloudRuntimeException(msg);
|
||||||
|
s_logger.warn(msg, e);
|
||||||
}
|
}
|
||||||
return rows == 1;
|
return rows == 1;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user