activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gtu...@apache.org
Subject git commit: https://issues.apache.org/jira/browse/AMQ-4832 - apply patch from Matthew Walker with thanks
Date Thu, 31 Oct 2013 21:16:51 GMT
Updated Branches:
  refs/heads/trunk 582af3e74 -> 855419359


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/85541935
Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/85541935
Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/85541935

Branch: refs/heads/trunk
Commit: 855419359cefbdb31be38510db121b17170af42d
Parents: 582af3e
Author: gtully <gary.tully@gmail.com>
Authored: Thu Oct 31 21:16:17 2013 +0000
Committer: gtully <gary.tully@gmail.com>
Committed: Thu Oct 31 21:16:17 2013 +0000

----------------------------------------------------------------------
 .../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/85541935/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