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

Cassandra get range slice got Inaccurate estimates for concurrencyFactor

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Normal
    • Resolution: Unresolved
    • None
    • Legacy/Coordination
    • None
    • Correctness
    • Normal
    • Normal
    • User Report
    • All
    • None

    Description

      Cassandra version :3.11.4
      For table that do not got a regular column , when we do partition range read and we got to the code function :

      // Some comments here
      public String getRangeSlice(PartitionRangeReadCommand command, ConsistencyLevel consistencyLevel, long queryStartNanoTime)
      

      we will do some calculation to estimate the data per range in the function :

      // Some comments here
      private static float estimateResultsPerRange(PartitionRangeReadCommand command, Keyspace keyspace)
      
      

      when we got no index so we will use :

      // Some comments here
      command.limits().estimateTotalResults(cfs)
       --->(for CQLlimits)
      *public float estimateTotalResults(ColumnFamilyStore cfs)
              {
                  // TODO: we should start storing stats on the number of rows (instead of the number of cells, which
                  // is what getMeanColumns returns)
                  float rowsPerPartition = ((float) cfs.getMeanColumns()) / cfs.metadata.partitionColumns().regulars.size();
                  return rowsPerPartition * (cfs.estimateKeys());
              }*
      

      when the regulars is zero ,we will got an error result that is non-zero value divided by zero .

      Attachments

        Activity

          People

            Unassigned Unassigned
            maxwellguo Maxwell Guo
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: