Skip to content

Commit d036168

Browse files
Anthony Xuke4qqq
authored andcommitted
cleaning up more conflicts
1 parent b4bddc6 commit d036168

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

framework/db/src/com/cloud/utils/db/Merovingian2.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,9 @@ public boolean acquire(String key, int timeInSeconds) {
138138
} catch (InterruptedException e) {
139139
}
140140
}
141-
if (s_logger.isTraceEnabled()) {
142-
s_logger.trace("Timed out on acquiring lock " + key + ". Waited for " + (InaccurateClock.getTime() - startTime));
143-
}
141+
String msg = "Timed out on acquiring lock " + key + " . Waited for " + ((InaccurateClock.getTime() - startTime)/1000) + "seconds";
142+
Exception e = new CloudRuntimeException(msg);
143+
s_logger.warn(msg, e);
144144
return false;
145145
}
146146

@@ -270,7 +270,9 @@ public boolean release(String key) {
270270
throw new CloudRuntimeException("release:Exception:"+ e.getMessage(), e);
271271
}
272272
} else if (rows < 1) {
273-
s_logger.warn("Was unable to find lock for the key " + key + " and thread id " + threadId);
273+
String msg = ("Was unable to find lock for the key " + key + " and thread id " + threadId);
274+
Exception e = new CloudRuntimeException(msg);
275+
s_logger.warn(msg, e);
274276
}
275277
return rows == 1;
276278
} catch (Exception e) {

0 commit comments

Comments
 (0)