You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by br...@apache.org on 2021/07/21 19:15:06 UTC

[cassandra] branch cassandra-3.0 updated: Calculate time remaining correctly for all compaction types in compactionstats

This is an automated email from the ASF dual-hosted git repository.

brandonwilliams pushed a commit to branch cassandra-3.0
in repository https://gitbox.apache.org/repos/asf/cassandra.git


The following commit(s) were added to refs/heads/cassandra-3.0 by this push:
     new 426253a  Calculate time remaining correctly for all compaction types in compactionstats
426253a is described below

commit 426253a34085f7f11fcef2b90b3abf8fce715583
Author: Brandon Williams <br...@apache.org>
AuthorDate: Thu May 6 13:00:43 2021 -0500

    Calculate time remaining correctly for all compaction types in compactionstats
    
    Patch by brandonwilliams; reviewed by adelapena for CASSANDRA-14701
---
 CHANGES.txt                                                       | 1 +
 src/java/org/apache/cassandra/tools/nodetool/CompactionStats.java | 4 +---
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/CHANGES.txt b/CHANGES.txt
index 58ac902..738fd3a 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 3.0.25:
+ * Calculate time remaining correctly for all compaction types in compactionstats (CASSANDRA-14701)
  * Receipt of gossip shutdown notification updates TokenMetadata (CASSANDRA-16796)
  * Count bloom filter misses correctly (CASSANDRA-12922)
  * Reject token() in MV WHERE clause (CASSANDRA-13464)
diff --git a/src/java/org/apache/cassandra/tools/nodetool/CompactionStats.java b/src/java/org/apache/cassandra/tools/nodetool/CompactionStats.java
index a18ac74..e68b534 100644
--- a/src/java/org/apache/cassandra/tools/nodetool/CompactionStats.java
+++ b/src/java/org/apache/cassandra/tools/nodetool/CompactionStats.java
@@ -26,7 +26,6 @@ import io.airlift.command.Command;
 import io.airlift.command.Option;
 import org.apache.cassandra.db.compaction.CompactionInfo.Unit;
 import org.apache.cassandra.db.compaction.CompactionManagerMBean;
-import org.apache.cassandra.db.compaction.OperationType;
 import org.apache.cassandra.io.util.FileUtils;
 import org.apache.cassandra.tools.NodeProbe;
 import org.apache.cassandra.tools.NodeTool.NodeToolCmd;
@@ -69,8 +68,7 @@ public class CompactionStats extends NodeToolCmd
                 String percentComplete = total == 0 ? "n/a" : new DecimalFormat("0.00").format((double) completed / total * 100) + "%";
                 String id = c.get("compactionId");
                 table.add(id, taskType, keyspace, columnFamily, completedStr, totalStr, unit, percentComplete);
-                if (taskType.equals(OperationType.COMPACTION.toString()))
-                    remainingBytes += total - completed;
+                remainingBytes += total - completed;
             }
 
             table.printTo(out);

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org