Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-12580

Fix merkle tree size calculation

    XMLWordPrintableJSON

Details

    • Normal

    Description

      On CASSANDRA-5263 it was introduced dynamic merkle tree sizing based on estimated number of partitions as estimatedDepth = lg(numPartitions), but on CompactionManager.doValidationCompaction 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.

      Attachments

        Issue Links

          Activity

            People

              pauloricardomg Paulo Motta (Deprecated)
              pauloricardomg Paulo Motta (Deprecated)
              Paulo Motta (Deprecated)
              Yuki Morishita
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: