On Thu, Sep 16, 2010 at 11:00 AM, Thomas Boucher <ethx...@gmail.com> wrote:

> Hi,
>
> I am trying out the latest trunk version and I get an error when
> starting Cassandra with -Xmx3G:
> Fatal error: memtable_operations_in_millions must be a positive double
>
> I guess it is caused by line 76 in org/apache/cassandra/config/Config.java
> [0]:
>
>    public Integer memtable_throughput_in_mb = (int)
> Runtime.getRuntime().maxMemory() / 8;
>
> The cast to (int) is done on maxMemory() but this method returns a
> long, leading to a cast to a negative integer for mem=3G for instance.
> Thus memtable_operations_in_millions becomes negative (Double
> memtable_operations_in_millions = memtable_throughput_in_mb / 64 *
> 0.3) and the exception is thrown:
>
> maxMemory() is measured in bytes but I guess memtable_throughput_in_mb
> should in MB (as it names imply), which is not the case here.
>

Oops, good catch.  Fixed in r997841.

 -Brandon

Reply via email to