activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuco...@apache.org
Subject [1/2] activemq-artemis git commit: [ARTEMIS-1823] - Log warning on boot when persistence is disabled and paging enabled
Date Tue, 01 May 2018 00:43:45 GMT
Repository: activemq-artemis
Updated Branches:
  refs/heads/1.x adb11b88a -> 3e9ee356f


[ARTEMIS-1823] - Log warning on boot when persistence is disabled and paging enabled

no tests are needed as this is a simple logging change.

cherry-picked from 04d8390513b8e33c744cb2e98675229b4956b92e


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/0dd84db9
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/0dd84db9
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/0dd84db9

Branch: refs/heads/1.x
Commit: 0dd84db98fc242591810fb742d76d7703ad72829
Parents: adb11b8
Author: JiriOndrusek <jondruse@redhat.com>
Authored: Mon Apr 23 14:57:09 2018 +0200
Committer: JiriOndrusek <jondruse@redhat.com>
Committed: Fri Apr 27 08:40:36 2018 +0200

----------------------------------------------------------------------
 .../artemis/core/server/ActiveMQServerLogger.java        |  4 ++++
 .../artemis/core/server/impl/ActiveMQServerImpl.java     | 11 +++++++++++
 2 files changed, 15 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/0dd84db9/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQServerLogger.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQServerLogger.java
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQServerLogger.java
index e728d33..77f20e2 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQServerLogger.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQServerLogger.java
@@ -1795,4 +1795,8 @@ public interface ActiveMQServerLogger extends BasicLogger {
    @LogMessage(level = Logger.Level.WARN)
    @Message(id = 224078, value = "The size of duplicate cache detection (<id_cache-size/>)
appears to be too large {0}. It should be no greater than the number of messages that can
be squeezed into conformation buffer (<confirmation-window-size/>) {1}.", format = Message.Format.MESSAGE_FORMAT)
    void duplicateCacheSizeWarning(int idCacheSize, int confirmationWindowSize);
+
+   @LogMessage(level = Logger.Level.INFO)
+   @Message(id = 224092, value = "Despite disabled persistence, page files will be persisted.",
format = Message.Format.MESSAGE_FORMAT)
+   void pageWillBePersisted();
 }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/0dd84db9/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java
index 1fdd5dd..7d8a956 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java
@@ -146,6 +146,7 @@ import org.apache.activemq.artemis.core.server.reload.ReloadCallback;
 import org.apache.activemq.artemis.core.server.reload.ReloadManager;
 import org.apache.activemq.artemis.core.server.reload.ReloadManagerImpl;
 import org.apache.activemq.artemis.core.settings.HierarchicalRepository;
+import org.apache.activemq.artemis.core.settings.impl.AddressFullMessagePolicy;
 import org.apache.activemq.artemis.core.settings.impl.AddressSettings;
 import org.apache.activemq.artemis.core.settings.impl.HierarchicalObjectRepository;
 import org.apache.activemq.artemis.core.settings.impl.ResourceLimitSettings;
@@ -2052,6 +2053,16 @@ public class ActiveMQServerImpl implements ActiveMQServer {
          deployAddressSettingsFromConfiguration();
       }
 
+      //fix of ARTEMIS-1823
+      if (!configuration.isPersistenceEnabled()) {
+         for (AddressSettings addressSettings : addressSettingsRepository.values()) {
+            if (addressSettings.getAddressFullMessagePolicy() == AddressFullMessagePolicy.PAGE)
{
+               ActiveMQServerLogger.LOGGER.pageWillBePersisted();
+               break;
+            }
+         }
+      }
+
       storageManager.start();
 
       postOffice.start();


Mime
View raw message