cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jonathan Ellis (JIRA)" <j...@apache.org>
Subject [jira] [Assigned] (CASSANDRA-6647) Config param [compaction_throughput_mb_per_sec] unsafe calculation.
Date Tue, 04 Feb 2014 15:54:11 GMT

     [ https://issues.apache.org/jira/browse/CASSANDRA-6647?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Jonathan Ellis reassigned CASSANDRA-6647:
-----------------------------------------

    Assignee: Dave Brosius

> Config param [compaction_throughput_mb_per_sec] unsafe calculation.
> -------------------------------------------------------------------
>
>                 Key: CASSANDRA-6647
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-6647
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>         Environment: RHEL 6.3 x64, jdk 1.7u51 64 bit (server mode),apache-cassandra 2.0.4
>            Reporter: Platon Vai
>            Assignee: Dave Brosius
>            Priority: Minor
>             Fix For: 2.0.4
>
>
> In cassandra.yaml i set 
> compaction_throughput_mb_per_sec: 2048
> and got en exception
> ERROR 16:15:41,705 Exception in thread Thread[CompactionExecutor:3,1,main]
> java.lang.IllegalArgumentException: rate must be positive
>         at com.google.common.base.Preconditions.checkArgument(Preconditions.java:93)
>         at com.google.common.util.concurrent.RateLimiter.setRate(RateLimiter.java:355)
>         at org.apache.cassandra.db.compaction.CompactionManager.getRateLimiter(CompactionManager.java:119)
>         at org.apache.cassandra.db.compaction.AbstractCompactionStrategy.getScanners(AbstractCompactionStrategy.java:241)
>         at org.apache.cassandra.db.compaction.AbstractCompactionStrategy.getScanners(AbstractCompactionStrategy.java:250)
>         at org.apache.cassandra.db.compaction.CompactionTask.runWith(CompactionTask.java:126)
>         at org.apache.cassandra.io.util.DiskAwareRunnable.runMayThrow(DiskAwareRunnable.java:48)
>         at org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:28)
>         at org.apache.cassandra.db.compaction.CompactionTask.executeInternal(CompactionTask.java:60)
>         at org.apache.cassandra.db.compaction.AbstractCompactionTask.execute(AbstractCompactionTask.java:59)
>         at org.apache.cassandra.db.compaction.CompactionManager$BackgroundCompactionTask.run(CompactionManager.java:197)
>         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
>         at java.util.concurrent.FutureTask.run(FutureTask.java:262)
>         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>         at java.lang.Thread.run(Thread.java:744)
> After trivial exploration i found this code
> CompactionManager.java:114
> double currentThroughput = DatabaseDescriptor.getCompactionThroughputMbPerSec() * 1024
* 1024;
> Main reason - result of multiplication out of range integer type
> I think simple fix
> double currentThroughput = DatabaseDescriptor.getCompactionThroughputMbPerSec() * 1024
* 1024L;



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Mime
View raw message