activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hadr...@apache.org
Subject [16/20] git commit: https://issues.apache.org/jira/browse/AMQ-4832 - apply patch from Matthew Walker with thanks
Date Wed, 12 Mar 2014 02:21:42 GMT
https://issues.apache.org/jira/browse/AMQ-4832 - apply patch from Matthew Walker with thanks


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

Branch: refs/heads/activemq-5.9
Commit: 8a9ea481fda02ae2cc2e80595e47d536a8f64542
Parents: 7ec13f2
Author: gtully <gary.tully@gmail.com>
Authored: Thu Oct 31 21:16:17 2013 +0000
Committer: Hadrian Zbarcea <hadrian@apache.org>
Committed: Tue Mar 11 21:19:23 2014 -0400

----------------------------------------------------------------------
 .../java/org/apache/activemq/broker/BrokerService.java    | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/8a9ea481/activemq-broker/src/main/java/org/apache/activemq/broker/BrokerService.java
----------------------------------------------------------------------
diff --git a/activemq-broker/src/main/java/org/apache/activemq/broker/BrokerService.java b/activemq-broker/src/main/java/org/apache/activemq/broker/BrokerService.java
index eecab9d..575e313 100644
--- a/activemq-broker/src/main/java/org/apache/activemq/broker/BrokerService.java
+++ b/activemq-broker/src/main/java/org/apache/activemq/broker/BrokerService.java
@@ -1908,14 +1908,16 @@ public class BrokerService implements Service {
                     dir = dir.getParentFile();
                 }
                 long storeLimit = usage.getStoreUsage().getLimit();
+                long storeCurrent = usage.getStoreUsage().getUsage();
                 long dirFreeSpace = dir.getUsableSpace();
-                if (storeLimit > dirFreeSpace) {
+                if (storeLimit > (dirFreeSpace + storeCurrent)) {
                     LOG.warn("Store limit is " + storeLimit / (1024 * 1024) +
-                             " mb, whilst the data directory: " + dir.getAbsolutePath() +
+                             " mb (current store usage is " + storeCurrent / (1024 * 1024)
+
+                             " mb). The data directory: " + dir.getAbsolutePath() +
                              " only has " + dirFreeSpace / (1024 * 1024) +
                              " mb of usable space - resetting to maximum available disk space:
" +
-                            dirFreeSpace / (1024 * 1024) + " mb");
-                    usage.getStoreUsage().setLimit(dirFreeSpace);
+                            (dirFreeSpace + storeCurrent) / (1024 * 1024) + " mb");
+                    usage.getStoreUsage().setLimit(dirFreeSpace + storeCurrent);
                 }
             }
 


Mime
View raw message