From 35222485e84069394546f6220dd514964b3951ce Mon Sep 17 00:00:00 2001 From: Clebert Suconic Date: Mon, 22 Jan 2018 12:33:14 -0500 Subject: [PATCH] ARTEMIS-1628 Limit pool size on artemis journal --- .../org/apache/activemq/artemis/cli/commands/etc/broker.xml | 2 +- .../activemq/artemis/core/config/impl/ConfigurationImpl.java | 3 +++ .../activemq/artemis/core/server/ActiveMQServerLogger.java | 4 ++++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/etc/broker.xml b/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/etc/broker.xml index 4ab1660704..84228de0c2 100644 --- a/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/etc/broker.xml +++ b/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/etc/broker.xml @@ -49,7 +49,7 @@ ${jdbc} 2 - -1 + 10 10M ${journal-buffer.settings}${ping-config.settings}${connector-config.settings} diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/config/impl/ConfigurationImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/config/impl/ConfigurationImpl.java index 93085f9b24..397705cde3 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/config/impl/ConfigurationImpl.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/config/impl/ConfigurationImpl.java @@ -862,6 +862,9 @@ public class ConfigurationImpl implements Configuration, Serializable { @Override public Configuration setJournalPoolFiles(int poolSize) { this.journalPoolFiles = poolSize; + if (!Env.isTestEnv()) { + ActiveMQServerLogger.LOGGER.useFixedValueOnJournalPoolFiles(); + } return this; } 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 26fb1ef8ef..7ae1ee4078 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 @@ -1574,6 +1574,10 @@ public interface ActiveMQServerLogger extends BasicLogger { @Message(id = 222268, value = "Failed to remove a record", format = Message.Format.MESSAGE_FORMAT) void failedToRemoveRecord(@Cause Exception e); + @LogMessage(level = Logger.Level.WARN) + @Message(id = 222269, value = "Please use a fixed value for \"journal-pool-files\". Default changed per https://issues.apache.org/jira/browse/ARTEMIS-1628", format = Message.Format.MESSAGE_FORMAT) + void useFixedValueOnJournalPoolFiles(); + @LogMessage(level = Logger.Level.ERROR) @Message(id = 224000, value = "Failure in initialisation", format = Message.Format.MESSAGE_FORMAT) void initializationError(@Cause Throwable e);