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

compaction_large_partition_warning_threshold_mb not working properly when set to high value

    XMLWordPrintableJSON

Details

    • Low

    Description

      compaction_large_partition_warning_threshold_mb has been set either by mistake or as an attempt to disable warnings completely to high value 512000
      However system started to produce warning no matter what the partition size is:

      Compacting large partition system/compactions_in_progress:e631fe20-e488-11e6-bcd7-bf6151c7fa28 (32 bytes)

      When looking into the code:

       public static int getCompactionLargePartitionWarningThreshold() { return conf.compaction_large_partition_warning_threshold_mb * 1024 * 1024; }
      

      which is called in

      private void maybeLogLargePartitionWarning(DecoratedKey key, long rowSize)
          {
              if (rowSize > DatabaseDescriptor.getCompactionLargePartitionWarningThreshold())
              {
                  String keyString = metadata().partitionKeyType.getString(key.getKey());
                  logger.warn("Writing large partition {}/{}:{} ({}) to sstable {}", metadata.keyspace, metadata.name, keyString, FBUtilities.prettyPrintMemory(rowSize), getFilename());
              }
      }
      

      it looks like 512000 is multiplied by 1M and returned as int so being out of range... Maybe it would be better to use long as it is used for rowSize

      Attachments

        1. 13172.patch
          1 kB
          Kurt Greaves

        Activity

          People

            KurtG Kurt Greaves
            vvavro Vladimir Vavro
            Kurt Greaves
            Jeff Jirsa
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: