[1/2] activemq-artemis git commit: ARTEMIS-1096 Fixing configuration issues on calculated global-max-page

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[1/2] activemq-artemis git commit: ARTEMIS-1096 Fixing configuration issues on calculated global-max-page

jbertram
Repository: activemq-artemis
Updated Branches:
  refs/heads/master f282dff57 -> 305d16fd3


ARTEMIS-1096 Fixing configuration issues on calculated global-max-page


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

Branch: refs/heads/master
Commit: 4e59c174ff378ffbc550ceb3fe7549fa58e62774
Parents: f282dff
Author: Clebert Suconic <[hidden email]>
Authored: Tue Apr 11 10:08:17 2017 -0400
Committer: Clebert Suconic <[hidden email]>
Committed: Tue Apr 11 14:06:44 2017 -0400

----------------------------------------------------------------------
 .../artemis/cli/commands/etc/global-max-specified.txt        | 1 -
 .../artemis/core/deployers/impl/FileConfigurationParser.java | 8 +++++++-
 2 files changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/4e59c174/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/etc/global-max-specified.txt
----------------------------------------------------------------------
diff --git a/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/etc/global-max-specified.txt b/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/etc/global-max-specified.txt
index afea35b..4d617b2 100644
--- a/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/etc/global-max-specified.txt
+++ b/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/etc/global-max-specified.txt
@@ -1,4 +1,3 @@
       <!-- the system will enter into page mode once you hit this limit.
            This is an estimate in bytes of how much the messages are using in memory -->
-      <!--
       <global-max-size>${global-max-size}</global-max-size>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/4e59c174/artemis-server/src/main/java/org/apache/activemq/artemis/core/deployers/impl/FileConfigurationParser.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/deployers/impl/FileConfigurationParser.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/deployers/impl/FileConfigurationParser.java
index 03a8605..030f531 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/deployers/impl/FileConfigurationParser.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/deployers/impl/FileConfigurationParser.java
@@ -316,7 +316,13 @@ public final class FileConfigurationParser extends XMLConfigurationUtil {
 
       config.setConfigurationFileRefreshPeriod(getLong(e, "configuration-file-refresh-period", config.getConfigurationFileRefreshPeriod(), Validators.GT_ZERO));
 
-      config.setGlobalMaxSize(getTextBytesAsLongBytes(e, GLOBAL_MAX_SIZE, config.getGlobalMaxSize(), Validators.MINUS_ONE_OR_GT_ZERO));
+      long globalMaxSize = getTextBytesAsLongBytes(e, GLOBAL_MAX_SIZE, -1, Validators.MINUS_ONE_OR_GT_ZERO);
+
+      if (globalMaxSize > 0) {
+         // We only set it if it's not set on the XML, otherwise getGlobalMaxSize will calculate it.
+         // We do it this way because it will be valid also on the case of embedded
+         config.setGlobalMaxSize(globalMaxSize);
+      }
 
       config.setMaxDiskUsage(getInteger(e, MAX_DISK_USAGE, config.getMaxDiskUsage(), Validators.PERCENTAGE));
 

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[2/2] activemq-artemis git commit: This closes #1198

jbertram
This closes #1198


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

Branch: refs/heads/master
Commit: 305d16fd3af4347b65b740b48bf11668a5c7f19e
Parents: f282dff 4e59c17
Author: Justin Bertram <[hidden email]>
Authored: Tue Apr 11 15:06:54 2017 -0500
Committer: Justin Bertram <[hidden email]>
Committed: Tue Apr 11 15:06:54 2017 -0500

----------------------------------------------------------------------
 .../artemis/cli/commands/etc/global-max-specified.txt        | 1 -
 .../artemis/core/deployers/impl/FileConfigurationParser.java | 8 +++++++-
 2 files changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


Loading...