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.


What do you think?

Thanks for any input you have to this,
Cheers

[0] 
http://svn.apache.org/repos/asf/cassandra/trunk/src/java/org/apache/cassandra/config/Config.java

Reply via email to