I believe (may be wrong) that CompletedTasks counts Validation compactions while TotalCompactionsCompleted does not. Considering a lot of validation compactions can be created every repair it might explain the difference. I'm not sure why they are named that way or work the way they do. There appears to be no documentation around this in the code (what a surprise) and looks like it was last touched in CASSANDRA-4009 <https://issues.apache.org/jira/browse/CASSANDRA-4009>, which also has no useful info.
On 27 October 2017 at 13:48, Lucas Benevides <lu...@maurobenevides.com.br> wrote: > Dear community, > > I am studying the behaviour of the Cassandra TimeWindowCompactionStragegy. > To do so I am watching some metrics. Two of these metrics are important: > Compaction.CompletedTasks, a gauge, and the TotalCompactionsCompleted, a > Meter. > > According to the documentation (http://cassandra.apache.org/ > doc/latest/operating/metrics.html#table-metrics): > Completed Taks = Number of completed compactions since server [re]start. > TotalCompactionsCompleted = Throughput of completed compactions since > server [re]start. > > As I realized, the TotalCompactionsCompleted, in the Meter object, has a > counter, which I supposed would be numerically close to the CompletedTasks > gauge. But they are very different, with the Completed Tasks being much > higher than the TotalCompactions Completed. > > According to the code, in github (class metrics.CompactionMetrics.java): > Completed Taks - Number of completed compactions since server [re]start > TotalCompactionsCompleted - Total number of compactions since server > [re]start > > Can you help me and explain the difference between these two metrics, as > they seem to have very distinct values, with the Completed Tasks being > around 1000 times the value of the counter in TotalCompactionsCompleted. > > Thanks in Advance, > Lucas Benevides > >