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

Yuki Morishita updated CASSANDRA-12580:
---------------------------------------
       Resolution: Fixed
    Fix Version/s:     (was: 3.0.x)
                       (was: 2.2.x)
                       (was: 2.1.x)
                       (was: 3.x)
                   3.10
                   3.0.10
                   2.2.9
           Status: Resolved  (was: Ready to Commit)

Committed to 2.2+ as {{c70ce6307da824529762ff40673642b6f86972aa}}.
(Skipped 2.1 because it is not critical at this point.)

> Fix merkle tree size calculation
> --------------------------------
>
>                 Key: CASSANDRA-12580
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-12580
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Paulo Motta
>            Assignee: Paulo Motta
>             Fix For: 2.2.9, 3.0.10, 3.10
>
>
> On CASSANDRA-5263 it was introduced dynamic merkle tree sizing based on 
> estimated number of partitions as {{estimatedDepth = lg(numPartitions)}}, but 
> on 
> [CompactionManager.doValidationCompaction|https://github.com/apache/cassandra/blob/cassandra-2.1/src/java/org/apache/cassandra/db/compaction/CompactionManager.java#L1052]
>  this is being calculated as:
> {{int depth = numPartitions > 0 ? (int) 
> Math.min(Math.floor(Math.log(numPartitions)), 20) : 0;}}
> This is actually calculating {{ln(numPartitions)}} (base-e) instead of 
> {{lg(numPartitions)}} (base-2), which causes merkle trees to lose resolution, 
> what may result in overstreaming.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to