mirror of https://github.com/apache/cassandra
Match estimated tasks arithmetic to score in LCS
Patch by carlyeks; reviewed by marcuse for CASSANDRA-8904
This commit is contained in:
parent
31a182876e
commit
08147376aa
|
|
@ -1,4 +1,5 @@
|
|||
2.0.14:
|
||||
* Improve compaction estimated tasks estimation (CASSANDRA-8904)
|
||||
* Fix duplicate up/down messages sent to native clients (CASSANDRA-7816)
|
||||
* Expose commit log archive status via JMX (CASSANDRA-8734)
|
||||
* Provide better exceptions for invalid replication strategy parameters
|
||||
|
|
|
|||
|
|
@ -623,7 +623,8 @@ public class LeveledManifest
|
|||
for (int i = generations.length - 1; i >= 0; i--)
|
||||
{
|
||||
List<SSTableReader> sstables = generations[i];
|
||||
estimated[i] = Math.max(0L, SSTableReader.getTotalBytes(sstables) - maxBytesForLevel(i)) / maxSSTableSizeInBytes;
|
||||
// If there is 1 byte over TBL - (MBL * 1.001), there is still a task left, so we need to round up.
|
||||
estimated[i] = (long)Math.ceil((double)Math.max(0L, SSTableReader.getTotalBytes(sstables) - (long)(maxBytesForLevel(i) * 1.001)) / (double)maxSSTableSizeInBytes);
|
||||
tasks += estimated[i];
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue