jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From meteata...@apache.org
Subject svn commit: r1415530 - /jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/impl/command/CommitCommand.java
Date Fri, 30 Nov 2012 08:00:07 GMT
Author: meteatamel
Date: Fri Nov 30 08:00:05 2012
New Revision: 1415530

URL: http://svn.apache.org/viewvc?rev=1415530&view=rev
Log:
Log improvements in CommitCommand

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

Modified: jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/impl/command/CommitCommand.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/impl/command/CommitCommand.java?rev=1415530&r1=1415529&r2=1415530&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/impl/command/CommitCommand.java
(original)
+++ jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/impl/command/CommitCommand.java
Fri Nov 30 08:00:05 2012
@@ -79,7 +79,7 @@ public class CommitCommand extends BaseC
         do {
             mongoSync = new ReadAndIncHeadRevisionAction(nodeStore).execute();
             revisionId = mongoSync.getNextRevisionId() - 1;
-            logger.debug("Trying to commit: {} @rev{}", commit.getDiff(), revisionId);
+            logger.info("Committing @{} with diff: {}", revisionId, commit.getDiff());
             readValidCommits();
             readBranchIdFromBaseCommit();
             createMongoNodes();
@@ -92,6 +92,7 @@ public class CommitCommand extends BaseC
             success = saveAndSetHeadRevision();
         } while (!success);
 
+        logger.info("Commit @{}: success", revisionId);
         return revisionId;
     }
 
@@ -266,16 +267,14 @@ public class CommitCommand extends BaseC
             // If not, need to retry again (in order to write commits and nodes properly)
             // but don't count these retries against number of retries.
             if (conflictingCommitsExist(assumedHeadRevision)) {
-                String message = String.format("Encountered a concurrent conflicting update"
-                        + ", thus can't commit revision %s with affected paths %s."
-                        + " Retry with a new revision.", revisionId, commit.getAffectedPaths());
+                String message = String.format("Commit @%s: failed due to a conflicting commit."
+                        + " Affected paths: %s", revisionId, commit.getAffectedPaths());
                 logger.warn(message);
                 markAsFailed();
                 throw new ConflictingCommitException(message);
             } else {
-                logger.warn("Encountered a concurrent but non-conflicting update"
-                        + ", thus can't commit revision {} with affected paths {}."
-                        + " Retry with a new revision.", revisionId, commit.getAffectedPaths());
+                logger.warn("Commit @{}: failed due to a conflicting commit."
+                        + " Affected paths: {}", revisionId, commit.getAffectedPaths());
                 markAsFailed();
                 return false;
             }



Mime
View raw message