qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kw...@apache.org
Subject svn commit: r1616806 - in /qpid/trunk/qpid/java: bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/AbstractBDBMessageStore.java broker-core/src/main/java/org/apache/qpid/server/store/AbstractJDBCMessageStore.java
Date Fri, 08 Aug 2014 15:43:43 GMT
Author: kwall
Date: Fri Aug  8 15:43:43 2014
New Revision: 1616806

URL: http://svn.apache.org/r1616806
Log:
QPID-5979: Derby/JDBC logs unnecessary "message not found" at WARN on rollback.

Modified:
    qpid/trunk/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/AbstractBDBMessageStore.java
    qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/store/AbstractJDBCMessageStore.java

Modified: qpid/trunk/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/AbstractBDBMessageStore.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/AbstractBDBMessageStore.java?rev=1616806&r1=1616805&r2=1616806&view=diff
==============================================================================
--- qpid/trunk/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/AbstractBDBMessageStore.java
(original)
+++ qpid/trunk/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/AbstractBDBMessageStore.java
Fri Aug  8 15:43:43 2014
@@ -388,10 +388,11 @@ public abstract class AbstractBDBMessage
                     OperationStatus status = getMessageMetaDataDb().delete(tx, key);
                     if (status == OperationStatus.NOTFOUND)
                     {
-                        getLogger().info(
-                                "Message not found (attempt to remove failed - probably application
initiated rollback) "
-                                +
-                                messageId);
+                        if (getLogger().isDebugEnabled())
+                        {
+                            getLogger().debug("Message id " + messageId
+                                + " not found (attempt to remove failed - probably application
initiated rollback)");
+                        }
                     }
 
                     if (getLogger().isDebugEnabled())
@@ -426,7 +427,7 @@ public abstract class AbstractBDBMessage
                     catch(DatabaseException e2)
                     {
                         getLogger().warn(
-                                "Unable to abort transaction after LockConflictExcption on
removal of message with id "
+                                "Unable to abort transaction after LockConflictException
on removal of message with id "
                                 + messageId,
                                 e2);
                         // rethrow the original log conflict exception, the secondary exception
should already have

Modified: qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/store/AbstractJDBCMessageStore.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/store/AbstractJDBCMessageStore.java?rev=1616806&r1=1616805&r2=1616806&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/store/AbstractJDBCMessageStore.java
(original)
+++ qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/store/AbstractJDBCMessageStore.java
Fri Aug  8 15:43:43 2014
@@ -473,7 +473,11 @@ public abstract class AbstractJDBCMessag
 
                     if (results == 0)
                     {
-                        getLogger().warn("Message metadata not found for message id " + messageId);
+                        if (getLogger().isDebugEnabled())
+                        {
+                            getLogger().debug("Message id " + messageId
+                                              + " not found (attempt to remove failed - probably
application initiated rollback)");
+                        }
                     }
 
                     if (getLogger().isDebugEnabled())
@@ -482,7 +486,7 @@ public abstract class AbstractJDBCMessag
                     }
 
                     stmt = conn.prepareStatement(DELETE_FROM_MESSAGE_CONTENT);
-                    stmt.setLong(1,messageId);
+                    stmt.setLong(1, messageId);
                     results = stmt.executeUpdate();
                 }
                 finally
@@ -1492,7 +1496,6 @@ public abstract class AbstractJDBCMessag
                 if(stored())
                 {
                     checkMessageStoreOpen();
-                    getLogger().debug("GET CONTENT for message id " + _messageId);
                     data = AbstractJDBCMessageStore.this.getAllContent(_messageId);
                     T metaData = _messageDataRef.getMetaData();
                     if (metaData == null)
@@ -1568,7 +1571,10 @@ public abstract class AbstractJDBCMessag
         @Override
         public void remove()
         {
-            getLogger().debug("REMOVE called on message: " + _messageId);
+            if (getLogger().isDebugEnabled())
+            {
+                getLogger().debug("REMOVE called on message: " + _messageId);
+            }
             checkMessageStoreOpen();
 
             int delta = getMetaData().getContentSize();
@@ -1605,7 +1611,6 @@ public abstract class AbstractJDBCMessag
         {
             if (!stored())
             {
-                getLogger().debug("STORING message id " + _messageId);
                 storeMetaData(conn, _messageId, _messageDataRef.getMetaData());
                 AbstractJDBCMessageStore.this.addContent(conn, _messageId,
                                                                _messageDataRef.getData()
== null
@@ -1636,7 +1641,6 @@ public abstract class AbstractJDBCMessag
 
                     Pointer(final MessageData<T> ref)
                     {
-                        getLogger().debug("POST COMMIT for message id " + _messageId);
                         _ref = ref;
                     }
 



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message