Author: mreutegg
Date: Thu Jan 24 11:36:51 2013
New Revision: 1437966

URL: http://svn.apache.org/viewvc?rev=1437966&view=rev
Log:
Additional debug logging

Modified:
    
jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/impl/command/CommitCommandNew.java
    
jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/impl/instruction/CommitCommandInstructionVisitor.java

Modified: 
jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/impl/command/CommitCommandNew.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/impl/command/CommitCommandNew.java?rev=1437966&r1=1437965&r2=1437966&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/impl/command/CommitCommandNew.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/impl/command/CommitCommandNew.java
 Thu Jan 24 11:36:51 2013
@@ -85,7 +85,7 @@ public class CommitCommandNew extends Ba
     @Override
     public Long execute() throws Exception {
         int retries = 0;
-        boolean success = false;
+        boolean success;
         do {
             mongoSync = new ReadAndIncHeadRevisionAction(nodeStore).execute();
             revisionId = mongoSync.getNextRevisionId() - 1;
@@ -353,6 +353,7 @@ public class CommitCommandNew extends Ba
         DBObject update = new BasicDBObject("$set", new 
BasicDBObject(MongoCommit.KEY_FAILED, Boolean.TRUE));
         WriteResult writeResult = commitCollection.update(query, update,
                 false /*upsert*/, false /*multi*/, WriteConcern.SAFE);
+        logger.debug("Marked @{} failed", revisionId);
         nodeStore.evict(commit);
         if (writeResult.getError() != null) {
             // FIXME This is potentially a bug that we need to handle.

Modified: 
jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/impl/instruction/CommitCommandInstructionVisitor.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/impl/instruction/CommitCommandInstructionVisitor.java?rev=1437966&r1=1437965&r2=1437966&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/impl/instruction/CommitCommandInstructionVisitor.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/impl/instruction/CommitCommandInstructionVisitor.java
 Thu Jan 24 11:36:51 2013
@@ -34,6 +34,8 @@ import org.apache.jackrabbit.mongomk.imp
 import org.apache.jackrabbit.mongomk.impl.model.MongoCommit;
 import org.apache.jackrabbit.mongomk.impl.model.MongoNode;
 import org.apache.jackrabbit.oak.commons.PathUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * This class reads in the instructions generated from JSON, applies basic 
checks
@@ -41,6 +43,8 @@ import org.apache.jackrabbit.oak.commons
  */
 public class CommitCommandInstructionVisitor implements InstructionVisitor {
 
+    private static final Logger log = 
LoggerFactory.getLogger(CommitCommandInstructionVisitor.class);
+
     // the revision this commit is based on
     private final long baseRevisionId;
     private final MongoNodeStore nodeStore;
@@ -216,6 +220,7 @@ public class CommitCommandInstructionVis
             throw new NotFoundException(path + " @rev" + baseRevisionId);
         }
         node = existCommand.getNode();
+        log.debug("Read node @{}: {}", baseRevisionId, node);
         node.removeField("_id");
         if (addToMap) {
             pathNodeMap.put(path, node);


Reply via email to