[ https://issues.apache.org/jira/browse/CASSANDRA-12048?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Anuj Wadehra updated CASSANDRA-12048: ------------------------------------- Environment: Cassandra 2.0.x, 2.1.x, 2.2.x (was: Cassandra 2.2.x) > Bucket_low property has no effect in STCS Algo > ---------------------------------------------- > > Key: CASSANDRA-12048 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12048 > Project: Cassandra > Issue Type: Bug > Components: Compaction > Environment: Cassandra 2.0.x, 2.1.x, 2.2.x > Reporter: Anuj Wadehra > > It seems that the STCS algorithm is not impacted by setting the Bucket_low > Compaction property. Also,I see some optimization in STCS algo. > Problems: > 1. getBuckets() method of SizeTieredCompactionStrategy sorts sstables by size > in ascending order and then iterates over them one by one to associate them > to an existing/new bucket. When, iterating sstables in ascending order of > size, I can't find ANY single scenario where the current sstable in the outer > loop iteration is below the oldAverageSize of any existing bucket. Current > sstable being iterated will ALWAYS be greater than/equal to the > oldAverageSize of ALL existing buckets as ALL previous sstables in existing > buckets were smaller/equal in size to the sstable being iterated. > So, there is NO scenario when size > (oldAverageSize * bucketLow) and size < > oldAverageSize, so bucket_low property never comes into play no matter what > value you set for it. > 2. While iteraitng over sstables (sortedfiles) by size in ascending order, > there is no point iterating over all existing buckets. We could just start > from the LAST bucket where previous sstable was associated. oldAverageSize > of ALL other buckets will NEVER allow the sstable being iterated. > for (Entry<Long, List<T>> entry : buckets.entrySet()) > {...} > -- This message was sent by Atlassian JIRA (v6.3.4#6332)