activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r1233495 - /activemq/activemq-apollo/trunk/apollo-leveldb/src/main/scala/org/apache/activemq/apollo/broker/store/leveldb/leveldb/LevelDBClient.scala
Date Thu, 19 Jan 2012 17:33:23 GMT
Author: chirino
Date: Thu Jan 19 17:33:23 2012
New Revision: 1233495

URL: http://svn.apache.org/viewvc?rev=1233495&view=rev
Log:
Folks usually think 2G == Int.MaxValue anyways lets be nice and auto convert.

Modified:
    activemq/activemq-apollo/trunk/apollo-leveldb/src/main/scala/org/apache/activemq/apollo/broker/store/leveldb/leveldb/LevelDBClient.scala

Modified: activemq/activemq-apollo/trunk/apollo-leveldb/src/main/scala/org/apache/activemq/apollo/broker/store/leveldb/leveldb/LevelDBClient.scala
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-leveldb/src/main/scala/org/apache/activemq/apollo/broker/store/leveldb/leveldb/LevelDBClient.scala?rev=1233495&r1=1233494&r2=1233495&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-leveldb/src/main/scala/org/apache/activemq/apollo/broker/store/leveldb/leveldb/LevelDBClient.scala
(original)
+++ activemq/activemq-apollo/trunk/apollo-leveldb/src/main/scala/org/apache/activemq/apollo/broker/store/leveldb/leveldb/LevelDBClient.scala
Thu Jan 19 17:33:23 2012
@@ -217,7 +217,9 @@ class LevelDBClient(store: LevelDBStore)
   def log_size = {
     import OptionSupport._
     Option(config.log_size).map(MemoryPropertyEditor.parse(_)).map{size=>
-      if(size > Int.MaxValue) {
+      if(size == MemoryPropertyEditor.parse("2G")) {
+        Int.MaxValue // which is 2G - 1 (close enough!)
+      } else if(size > Int.MaxValue) {
         warn("leveldb log_size was configured to be '"+config.log_size+"' but the maximum
supported log size is 2G")
         Int.MaxValue
       } else {



Mime
View raw message