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

Nodetool Compact set the compaction type incorrectly

    XMLWordPrintableJSON

Details

    Description

      When using nodetool compactionstats to see what does the c*'s compactions are doing ,the output has got a column named "compaction type", but It seem that major compaction and minor compaction 's type are all name Compaction, after read the code I found that may be the the MAJOR_COMPACTION OperationType is not setted into AbstractCompactionTask
      at this method : CompactionStrategyManager -> getMaximalTasks .When we peform a major compact without any arguments we will got this execute path :

      // Some comments here
      Compact.java : probe.forceKeyspaceCompaction(splitOutput, keyspace, tableNames);
      --->
       ColumnFamilyStore.java :  cfStore.forceMajorCompaction(splitOutput);
      ---> 
      CompactionManager.java : submitMaximal(cfStore, gcBefore, splitOutput, OperationType.MAJOR_COMPACTION); 
      

      Unfortunately OperationType.MAJOR_COMPACTION is not rightly setted.

      see the picture on the right I perform a major compact , and on the left the compactionstats show the type is only Compaction ;
      I think it is import for us to know wether the task is a major or a minor .

      Attachments

        1. 20221116235846.jpg
          196 kB
          Maxwell Guo

        Activity

          People

            maxwellguo Maxwell Guo
            maxwellguo Maxwell Guo
            Maxwell Guo
            Brandon Williams, Branimir Lambov
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 1h 10m
                1h 10m