File tree Expand file tree Collapse file tree
framework/db/src/com/cloud/utils/db Expand file tree Collapse file tree Original file line number Diff line number Diff 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 ) {
You can’t perform that action at this time.
0 commit comments