Author: reschke
Date: Thu Mar 17 12:10:34 2016
New Revision: 1735405

URL: http://svn.apache.org/viewvc?rev=1735405&view=rev
Log:
OAK-4100: ClusterNodeInfo lease renewal: add DEBUG level logging

add DEBUG-level log of update result plus TRACE-level log of renewLease() 
invocation

Modified:
    
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/ClusterNodeInfo.java

Modified: 
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/ClusterNodeInfo.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/ClusterNodeInfo.java?rev=1735405&r1=1735404&r2=1735405&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/ClusterNodeInfo.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/ClusterNodeInfo.java
 Thu Mar 17 12:10:34 2016
@@ -715,6 +715,11 @@ public class ClusterNodeInfo {
      */
     public boolean renewLease() {
         long now = getCurrentTime();
+
+        if (LOG.isTraceEnabled()) {
+            LOG.trace("renewLease - leaseEndTime: " + leaseEndTime + ", 
leaseTime: " + leaseTime + ", leaseUpdateInterval: " + leaseUpdateInterval);
+        }
+
         if (now < leaseEndTime - leaseTime + leaseUpdateInterval) {
             // no need to renew the lease - it is still within 
'leaseUpdateInterval'
             return false;
@@ -763,9 +768,12 @@ public class ClusterNodeInfo {
         }
 
         if (LOG.isDebugEnabled()) {
-            LOG.debug("Renewing lease for for cluster id " + id + " with 
UpdateOp " + update);
+            LOG.debug("Renewing lease for cluster id " + id + " with UpdateOp 
" + update);
         }
         ClusterNodeInfoDocument doc = 
store.findAndUpdate(Collection.CLUSTER_NODES, update);
+        if (LOG.isDebugEnabled()) {
+            LOG.debug("Lease renewal for cluster id " + id + " resulted in: " 
+ doc);
+        }
  
         if (doc == null) { // should not occur when leaseCheckDisabled
             // OAK-3398 : someone else either started recovering or is already 
through with that.


Reply via email to